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

lightningnetwork / lnd / 16934057981

13 Aug 2025 10:05AM UTC coverage: 66.929% (+10.0%) from 56.955%
16934057981

push

github

web-flow
Merge pull request #9844 from ziggie1984/refactor-payments-code-03

Refactor Payment PR 3

106 of 147 new or added lines in 11 files covered. (72.11%)

62 existing lines in 7 files now uncovered.

135864 of 202997 relevant lines covered (66.93%)

21535.96 hits per line

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

50.0
/payments/db/options.go
1
package paymentsdb
2

3
// StoreOptions holds parameters for the KVStore.
4
type StoreOptions struct {
5
        // NoMigration allows to open the database in readonly mode
6
        NoMigration bool
7

8
        // KeepFailedPaymentAttempts is a flag that determines whether to keep
9
        // failed payment attempts for a settled payment in the db.
10
        KeepFailedPaymentAttempts bool
11
}
12

13
// OptionModifier is a function signature for modifying the default
14
// StoreOptions.
15
type OptionModifier func(*StoreOptions)
16

17
// WithKeepFailedPaymentAttempts sets the KeepFailedPaymentAttempts to n.
18
func WithKeepFailedPaymentAttempts(n bool) OptionModifier {
13✔
19
        return func(o *StoreOptions) {
26✔
20
                o.KeepFailedPaymentAttempts = n
13✔
21
        }
13✔
22
}
23

24
// WithNoMigration allows the database to be opened in read only mode by
25
// disabling migrations.
NEW
26
func WithNoMigration(b bool) OptionModifier {
×
NEW
27
        return func(o *StoreOptions) {
×
NEW
28
                o.NoMigration = b
×
NEW
29
        }
×
30
}
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