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

lightningnetwork / lnd / 13536249039

26 Feb 2025 03:42AM UTC coverage: 57.462% (-1.4%) from 58.835%
13536249039

Pull #8453

github

Roasbeef
peer: update chooseDeliveryScript to gen script if needed

In this commit, we update `chooseDeliveryScript` to generate a new
script if needed. This allows us to fold in a few other lines that
always followed this function into this expanded function.

The tests have been updated accordingly.
Pull Request #8453: [4/4] - multi: integrate new rbf coop close FSM into the existing peer flow

275 of 1318 new or added lines in 22 files covered. (20.86%)

19521 existing lines in 257 files now uncovered.

103858 of 180741 relevant lines covered (57.46%)

24750.23 hits per line

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

0.0
/build/handlers.go
1
package build
2

3
import (
4
        "os"
5

6
        "github.com/btcsuite/btclog/v2"
7
)
8

9
// NewDefaultLogHandlers returns the standard console logger and rotating log
10
// writer handlers that we generally want to use. It also applies the various
11
// config options to the loggers.
12
func NewDefaultLogHandlers(cfg *LogConfig,
UNCOV
13
        rotator *RotatingLogWriter) []btclog.Handler {
×
UNCOV
14

×
UNCOV
15
        var handlers []btclog.Handler
×
UNCOV
16

×
UNCOV
17
        consoleLogHandler := btclog.NewDefaultHandler(
×
UNCOV
18
                os.Stdout, cfg.Console.HandlerOptions()...,
×
UNCOV
19
        )
×
UNCOV
20
        logFileHandler := btclog.NewDefaultHandler(
×
UNCOV
21
                rotator, cfg.File.HandlerOptions()...,
×
UNCOV
22
        )
×
UNCOV
23

×
UNCOV
24
        maybeAddLogger := func(cmdOptionDisable bool, handler btclog.Handler) {
×
UNCOV
25
                if !cmdOptionDisable {
×
UNCOV
26
                        handlers = append(handlers, handler)
×
UNCOV
27
                }
×
28
        }
UNCOV
29
        switch LoggingType {
×
30
        case LogTypeStdOut:
×
31
                maybeAddLogger(cfg.Console.Disable, consoleLogHandler)
×
UNCOV
32
        case LogTypeDefault:
×
UNCOV
33
                maybeAddLogger(cfg.Console.Disable, consoleLogHandler)
×
UNCOV
34
                maybeAddLogger(cfg.File.Disable, logFileHandler)
×
35
        }
36

UNCOV
37
        return handlers
×
38
}
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