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

lightningnetwork / lnd / 13523316608

25 Feb 2025 02:12PM UTC coverage: 49.351% (-9.5%) from 58.835%
13523316608

Pull #9549

github

yyforyongyu
routing/chainview: refactor `TestFilteredChainView`

So each test has its own miner and chainView.
Pull Request #9549: Fix unit test flake `TestHistoricalConfDetailsTxIndex`

0 of 120 new or added lines in 1 file covered. (0.0%)

27196 existing lines in 434 files now uncovered.

100945 of 204543 relevant lines covered (49.35%)

1.54 hits per line

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

0.0
/channeldb/migration_01_to_11/options.go
1
package migration_01_to_11
2

3
import "time"
4

5
const (
6
        // DefaultRejectCacheSize is the default number of rejectCacheEntries to
7
        // cache for use in the rejection cache of incoming gossip traffic. This
8
        // produces a cache size of around 1MB.
9
        DefaultRejectCacheSize = 50000
10

11
        // DefaultChannelCacheSize is the default number of ChannelEdges cached
12
        // in order to reply to gossip queries. This produces a cache size of
13
        // around 40MB.
14
        DefaultChannelCacheSize = 20000
15

16
        // DefaultDBTimeout specifies the default timeout value when opening
17
        // the bbolt database.
18
        DefaultDBTimeout = time.Second * 60
19
)
20

21
// Options holds parameters for tuning and customizing a channeldb.DB.
22
type Options struct {
23
        // RejectCacheSize is the maximum number of rejectCacheEntries to hold
24
        // in the rejection cache.
25
        RejectCacheSize int
26

27
        // ChannelCacheSize is the maximum number of ChannelEdges to hold in the
28
        // channel cache.
29
        ChannelCacheSize int
30

31
        // NoFreelistSync, if true, prevents the database from syncing its
32
        // freelist to disk, resulting in improved performance at the expense of
33
        // increased startup time.
34
        NoFreelistSync bool
35

36
        // DBTimeout specifies the timeout value to use when opening the wallet
37
        // database.
38
        DBTimeout time.Duration
39
}
40

41
// DefaultOptions returns an Options populated with default values.
UNCOV
42
func DefaultOptions() Options {
×
UNCOV
43
        return Options{
×
UNCOV
44
                RejectCacheSize:  DefaultRejectCacheSize,
×
UNCOV
45
                ChannelCacheSize: DefaultChannelCacheSize,
×
UNCOV
46
                NoFreelistSync:   true,
×
UNCOV
47
                DBTimeout:        DefaultDBTimeout,
×
UNCOV
48
        }
×
UNCOV
49
}
×
50

51
// OptionModifier is a function signature for modifying the default Options.
52
type OptionModifier func(*Options)
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