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

lightningnetwork / lnd / 15561477203

10 Jun 2025 01:54PM UTC coverage: 58.351% (-10.1%) from 68.487%
15561477203

Pull #9356

github

web-flow
Merge 6440b25db into c6d6d4c0b
Pull Request #9356: lnrpc: add incoming/outgoing channel ids filter to forwarding history request

33 of 36 new or added lines in 2 files covered. (91.67%)

28366 existing lines in 455 files now uncovered.

97715 of 167461 relevant lines covered (58.35%)

1.81 hits per line

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

0.0
/lntest/mock/chainnotifier.go
1
package mock
2

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

9
// ChainNotifier is a mock implementation of the ChainNotifier interface.
10
type ChainNotifier struct {
11
        SpendChan chan *chainntnfs.SpendDetail
12
        EpochChan chan *chainntnfs.BlockEpoch
13
        ConfChan  chan *chainntnfs.TxConfirmation
14
}
15

16
// RegisterConfirmationsNtfn returns a ConfirmationEvent that contains a channel
17
// that the tx confirmation will go over.
18
func (c *ChainNotifier) RegisterConfirmationsNtfn(txid *chainhash.Hash,
19
        pkScript []byte, numConfs, heightHint uint32,
UNCOV
20
        opts ...chainntnfs.NotifierOption) (*chainntnfs.ConfirmationEvent, error) {
×
UNCOV
21

×
UNCOV
22
        return &chainntnfs.ConfirmationEvent{
×
UNCOV
23
                Confirmed: c.ConfChan,
×
UNCOV
24
                Cancel:    func() {},
×
25
        }, nil
26
}
27

28
// RegisterSpendNtfn returns a SpendEvent that contains a channel that the spend
29
// details will go over.
30
func (c *ChainNotifier) RegisterSpendNtfn(outpoint *wire.OutPoint,
UNCOV
31
        pkScript []byte, heightHint uint32) (*chainntnfs.SpendEvent, error) {
×
UNCOV
32

×
UNCOV
33
        return &chainntnfs.SpendEvent{
×
UNCOV
34
                Spend:  c.SpendChan,
×
UNCOV
35
                Cancel: func() {},
×
36
        }, nil
37
}
38

39
// RegisterBlockEpochNtfn returns a BlockEpochEvent that contains a channel that
40
// block epochs will go over.
41
func (c *ChainNotifier) RegisterBlockEpochNtfn(blockEpoch *chainntnfs.BlockEpoch) (
UNCOV
42
        *chainntnfs.BlockEpochEvent, error) {
×
UNCOV
43

×
UNCOV
44
        return &chainntnfs.BlockEpochEvent{
×
UNCOV
45
                Epochs: c.EpochChan,
×
UNCOV
46
                Cancel: func() {},
×
47
        }, nil
48
}
49

50
// Start currently returns a dummy value.
51
func (c *ChainNotifier) Start() error {
×
52
        return nil
×
53
}
×
54

55
// Started currently returns a dummy value.
56
func (c *ChainNotifier) Started() bool {
×
57
        return true
×
58
}
×
59

60
// Stop currently returns a dummy value.
61
func (c *ChainNotifier) Stop() error {
×
62
        return nil
×
63
}
×
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