• 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
/lntest/mock/chainio.go
1
package mock
2

3
import (
4
        "github.com/btcsuite/btcd/chaincfg"
5
        "github.com/btcsuite/btcd/chaincfg/chainhash"
6
        "github.com/btcsuite/btcd/wire"
7
)
8

9
// ChainIO is a mock implementation of the BlockChainIO interface.
10
type ChainIO struct {
11
        BestHeight int32
12
}
13

14
// GetBestBlock currently returns dummy values.
UNCOV
15
func (c *ChainIO) GetBestBlock() (*chainhash.Hash, int32, error) {
×
UNCOV
16
        return chaincfg.TestNet3Params.GenesisHash, c.BestHeight, nil
×
UNCOV
17
}
×
18

19
// GetUtxo currently returns dummy values.
20
func (c *ChainIO) GetUtxo(op *wire.OutPoint, _ []byte,
21
        heightHint uint32, _ <-chan struct{}) (*wire.TxOut, error) {
×
22

×
23
        return nil, nil
×
24
}
×
25

26
// GetBlockHash currently returns dummy values.
27
func (c *ChainIO) GetBlockHash(blockHeight int64) (*chainhash.Hash, error) {
×
28
        return nil, nil
×
29
}
×
30

31
// GetBlock currently returns dummy values.
32
func (c *ChainIO) GetBlock(blockHash *chainhash.Hash) (*wire.MsgBlock, error) {
×
33
        return nil, nil
×
34
}
×
35

36
// GetBlockHeader currently returns dummy values.
37
func (c *ChainIO) GetBlockHeader(blockHash *chainhash.Hash) (*wire.BlockHeader,
38
        error) {
×
39

×
40
        return nil, nil
×
41
}
×
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