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

lightningnetwork / lnd / 12293715361

12 Dec 2024 09:38AM UTC coverage: 57.483% (+7.9%) from 49.538%
12293715361

Pull #9348

github

ziggie1984
github: update goveralls tool

The goverall tool had a bug regarding the module versioning of
golang packages see also
https://github.com/mattn/goveralls/pull/222 for more background.
Goveralls is wrapped by another library to make it available for
github actions. So the relevant PR which is referenced here in
LND is:
https://github.com/shogo82148/actions-goveralls/pull/521.
Pull Request #9348: github: update goveralls tool

101897 of 177264 relevant lines covered (57.48%)

24982.4 hits per line

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

0.0
/lncfg/invoices.go
1
package lncfg
2

3
const (
4
        // DefaultHoldInvoiceExpiryDelta defines the number of blocks before the
5
        // expiry height of a hold invoice's htlc that lnd will automatically
6
        // cancel the invoice to prevent the channel from force closing. This
7
        // value *must* be greater than DefaultIncomingBroadcastDelta to prevent
8
        // force closes.
9
        DefaultHoldInvoiceExpiryDelta = DefaultIncomingBroadcastDelta + 2
10

11
        // DefaultMinNumRealBlindedPathHops is the minimum number of _real_
12
        // hops to include in a blinded payment path. This doesn't include our
13
        // node (the destination node), so if the minimum is 1, then the path
14
        // will contain at minimum our node along with an introduction node hop.
15
        DefaultMinNumRealBlindedPathHops = 1
16

17
        // DefaultNumBlindedPathHops is the number of hops to include in a
18
        // blinded payment path. If paths shorter than this number are found,
19
        // then dummy hops are used to pad the path to this length.
20
        DefaultNumBlindedPathHops = 2
21

22
        // DefaultMaxNumBlindedPaths is the maximum number of different blinded
23
        // payment paths to include in an invoice.
24
        DefaultMaxNumBlindedPaths = 3
25

26
        // DefaultBlindedPathPolicyIncreaseMultiplier is the default multiplier
27
        // used to increase certain blinded hop policy values in order to add
28
        // a probing buffer.
29
        DefaultBlindedPathPolicyIncreaseMultiplier = 1.1
30

31
        // DefaultBlindedPathPolicyDecreaseMultiplier is the default multiplier
32
        // used to decrease certain blinded hop policy values in order to add a
33
        // probing buffer.
34
        DefaultBlindedPathPolicyDecreaseMultiplier = 0.9
35
)
36

37
// Invoices holds the configuration options for invoices.
38
//
39
//nolint:ll
40
type Invoices struct {
41
        HoldExpiryDelta uint32 `long:"holdexpirydelta" description:"The number of blocks before a hold invoice's htlc expires that the invoice should be canceled to prevent a force close. Force closes will not be prevented if this value is not greater than DefaultIncomingBroadcastDelta."`
42
}
43

44
// Validate checks that the various invoice config options are sane.
45
//
46
// NOTE: this is part of the Validator interface.
47
func (i *Invoices) Validate() error {
×
48
        // Log a warning if our expiry delta is not greater than our incoming
×
49
        // broadcast delta. We do not fail here because this value may be set
×
50
        // to zero to intentionally keep lnd's behavior unchanged from when we
×
51
        // didn't auto-cancel these invoices.
×
52
        if i.HoldExpiryDelta <= DefaultIncomingBroadcastDelta {
×
53
                log.Warnf("Invoice hold expiry delta: %v <= incoming "+
×
54
                        "delta: %v, accepted hold invoices will force close "+
×
55
                        "channels if they are not canceled manually",
×
56
                        i.HoldExpiryDelta, DefaultIncomingBroadcastDelta)
×
57
        }
×
58

59
        return nil
×
60
}
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