• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

lightningnetwork / lnd / 14513053602

17 Apr 2025 09:56AM UTC coverage: 56.754% (-12.3%) from 69.035%
14513053602

Pull #9727

github

web-flow
Merge 5fb0f4317 into 24fdae7df
Pull Request #9727: Aux bandwidth manager: also pass HTLC blob to `ShouldHandleTraffic`

3 of 8 new or added lines in 2 files covered. (37.5%)

24357 existing lines in 290 files now uncovered.

107518 of 189445 relevant lines covered (56.75%)

22634.92 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

80.95
/lnutils/log.go
1
package lnutils
2

3
import (
4
        "strings"
5

6
        "github.com/davecgh/go-spew/spew"
7
)
8

9
// LogClosure is used to provide a closure over expensive logging operations so
10
// don't have to be performed when the logging level doesn't warrant it.
11
type LogClosure func() string
12

13
// String invokes the underlying function and returns the result.
14
func (c LogClosure) String() string {
15
        return c()
16
}
17

4✔
18
// NewLogClosure returns a new closure over a function that returns a string
4✔
19
// which itself provides a Stringer interface so that it can be used with the
4✔
20
// logging system.
21
func NewLogClosure(c func() string) LogClosure {
22
        return LogClosure(c)
23
}
24

2,955✔
25
// SpewLogClosure takes an interface and returns the string of it created from
2,955✔
26
// `spew.Sdump` in a LogClosure.
2,955✔
27
func SpewLogClosure(a any) LogClosure {
28
        return func() string {
29
                return spew.Sdump(a)
30
        }
9,078✔
31
}
9,082✔
32

4✔
33
// NewSeparatorClosure returns a new closure that logs a separator line.
4✔
34
func NewSeparatorClosure() LogClosure {
35
        return func() string {
36
                return strings.Repeat("=", 80)
37
        }
1✔
38
}
1✔
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2025 Coveralls, Inc