• 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
/lncfg/htlcswitch.go
1
package lncfg
2

3
import (
4
        "fmt"
5
        "time"
6
)
7

8
var (
9
        // MaxMailboxDeliveryTimeout specifies the max allowed timeout value.
10
        // This value is derived from the itest `async_bidirectional_payments`,
11
        // where both side send 483 payments at the same time to stress test
12
        // lnd.
13
        MaxMailboxDeliveryTimeout = 2 * time.Minute
14
)
15

16
//nolint:ll
17
type Htlcswitch struct {
18
        MailboxDeliveryTimeout time.Duration `long:"mailboxdeliverytimeout" description:"The timeout value when delivering HTLCs to a channel link. Setting this value too small will result in local payment failures if large number of payments are sent over a short period."`
19
}
20

21
// Validate checks the values configured for htlcswitch.
UNCOV
22
func (h *Htlcswitch) Validate() error {
×
UNCOV
23
        if h.MailboxDeliveryTimeout <= 0 {
×
24
                return fmt.Errorf("mailboxdeliverytimeout must be positive")
×
25
        }
×
26

UNCOV
27
        if h.MailboxDeliveryTimeout > MaxMailboxDeliveryTimeout {
×
28
                return fmt.Errorf("mailboxdeliverytimeout: %v exceeds "+
×
29
                        "maximum: %v", h.MailboxDeliveryTimeout,
×
30
                        MaxMailboxDeliveryTimeout)
×
31
        }
×
32

UNCOV
33
        return nil
×
34
}
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