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

lightningnetwork / lnd / 16126098235

07 Jul 2025 07:30PM UTC coverage: 67.565% (+9.8%) from 57.787%
16126098235

Pull #9957

github

web-flow
Merge b01eea655 into b815109b8
Pull Request #9957: Re-send AnnouncementSignature not more than once per connection.

80 of 99 new or added lines in 5 files covered. (80.81%)

33 existing lines in 9 files now uncovered.

135185 of 200081 relevant lines covered (67.57%)

21872.21 hits per line

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

0.0
/lnpeer/mock_peer.go
1
package lnpeer
2

3
import (
4
        "net"
5

6
        "github.com/btcsuite/btcd/btcec/v2"
7
        "github.com/btcsuite/btcd/wire"
8
        "github.com/lightningnetwork/lnd/lnwire"
9
        "github.com/stretchr/testify/mock"
10
)
11

12
// MockPeer implements the `lnpeer.Peer` interface.
13
type MockPeer struct {
14
        mock.Mock
15
}
16

17
// Compile time assertion that MockPeer implements lnpeer.Peer.
18
var _ Peer = (*MockPeer)(nil)
19

20
func (m *MockPeer) SendMessage(sync bool, msgs ...lnwire.Message) error {
×
21
        args := m.Called(sync, msgs)
×
22
        return args.Error(0)
×
23
}
×
24

25
func (m *MockPeer) SendMessageLazy(sync bool, msgs ...lnwire.Message) error {
×
26
        args := m.Called(sync, msgs)
×
27
        return args.Error(0)
×
28
}
×
29

30
func (m *MockPeer) AddNewChannel(channel *NewChannel,
31
        cancel <-chan struct{}) error {
×
32

×
33
        args := m.Called(channel, cancel)
×
34
        return args.Error(0)
×
35
}
×
36

37
func (m *MockPeer) AddPendingChannel(cid lnwire.ChannelID,
38
        cancel <-chan struct{}) error {
×
39

×
40
        args := m.Called(cid, cancel)
×
41
        return args.Error(0)
×
42
}
×
43

44
func (m *MockPeer) RemovePendingChannel(cid lnwire.ChannelID) error {
×
45
        args := m.Called(cid)
×
46
        return args.Error(0)
×
47
}
×
48

49
func (m *MockPeer) WipeChannel(op *wire.OutPoint) {
×
50
        m.Called(op)
×
51
}
×
52

53
func (m *MockPeer) PubKey() [33]byte {
×
54
        args := m.Called()
×
55
        return args.Get(0).([33]byte)
×
56
}
×
57

58
func (m *MockPeer) IdentityKey() *btcec.PublicKey {
×
59
        args := m.Called()
×
60
        return args.Get(0).(*btcec.PublicKey)
×
61
}
×
62

63
func (m *MockPeer) Address() net.Addr {
×
64
        args := m.Called()
×
65
        return args.Get(0).(net.Addr)
×
66
}
×
67

68
func (m *MockPeer) QuitSignal() <-chan struct{} {
×
69
        args := m.Called()
×
70
        return args.Get(0).(<-chan struct{})
×
71
}
×
72

73
func (m *MockPeer) LocalFeatures() *lnwire.FeatureVector {
×
74
        args := m.Called()
×
75
        return args.Get(0).(*lnwire.FeatureVector)
×
76
}
×
77

78
func (m *MockPeer) RemoteFeatures() *lnwire.FeatureVector {
×
79
        args := m.Called()
×
80
        return args.Get(0).(*lnwire.FeatureVector)
×
81
}
×
82

83
func (m *MockPeer) Disconnect(err error) {}
×
84

NEW
85
func (s *MockPeer) RecordProofSent(chanID lnwire.ChannelID) {}
×
86

NEW
87
func (s *MockPeer) HasSentProof(chanID lnwire.ChannelID) bool {
×
NEW
88
        return false
×
NEW
89
}
×
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