• 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/meta.go
1
package migration_01_to_11
2

3
import (
4
        "github.com/lightningnetwork/lnd/kvdb"
5
)
6

7
var (
8
        // metaBucket stores all the meta information concerning the state of
9
        // the database.
10
        metaBucket = []byte("metadata")
11

12
        // dbVersionKey is a boltdb key and it's used for storing/retrieving
13
        // current database version.
14
        dbVersionKey = []byte("dbp")
15
)
16

17
// Meta structure holds the database meta information.
18
type Meta struct {
19
        // DbVersionNumber is the current schema version of the database.
20
        DbVersionNumber uint32
21
}
22

23
// putMeta is an internal helper function used in order to allow callers to
24
// re-use a database transaction. See the publicly exported PutMeta method for
25
// more information.
UNCOV
26
func putMeta(meta *Meta, tx kvdb.RwTx) error {
×
UNCOV
27
        metaBucket, err := tx.CreateTopLevelBucket(metaBucket)
×
UNCOV
28
        if err != nil {
×
29
                return err
×
30
        }
×
31

UNCOV
32
        return putDbVersion(metaBucket, meta)
×
33
}
34

UNCOV
35
func putDbVersion(metaBucket kvdb.RwBucket, meta *Meta) error {
×
UNCOV
36
        scratch := make([]byte, 4)
×
UNCOV
37
        byteOrder.PutUint32(scratch, meta.DbVersionNumber)
×
UNCOV
38
        return metaBucket.Put(dbVersionKey, scratch)
×
UNCOV
39
}
×
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