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

lightningnetwork / lnd / 17191871672

24 Aug 2025 05:44PM UTC coverage: 66.162% (+8.8%) from 57.321%
17191871672

Pull #9147

github

web-flow
Merge edec0450e into 0c2f045f5
Pull Request #9147: [Part 1|3] Introduce SQL Payment schema into LND

72 of 1878 new or added lines in 12 files covered. (3.83%)

17 existing lines in 7 files now uncovered.

135954 of 205487 relevant lines covered (66.16%)

21319.58 hits per line

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

71.43
/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
// DefaultOptions returns a StoreOptions populated with default values.
14
func DefaultOptions() *StoreOptions {
63✔
15
        return &StoreOptions{
63✔
16
                KeepFailedPaymentAttempts: false,
63✔
17
                NoMigration:               false,
63✔
18
        }
63✔
19
}
63✔
20

21
// StoreOptionModifier is a function signature for modifying the default
22
// StoreOptions.
23
type StoreOptionModifier func(*StoreOptions)
24

25
// WithKeepFailedPaymentAttempts sets the KeepFailedPaymentAttempts to n.
26
func WithKeepFailedPaymentAttempts(n bool) StoreOptionModifier {
13✔
27
        return func(o *StoreOptions) {
26✔
28
                o.KeepFailedPaymentAttempts = n
13✔
29
        }
13✔
30
}
31

32
// WithNoMigration allows the database to be opened in read only mode by
33
// disabling migrations.
NEW
34
func WithNoMigration(b bool) StoreOptionModifier {
×
35
        return func(o *StoreOptions) {
×
36
                o.NoMigration = b
×
37
        }
×
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