mirror of
https://github.com/lightningnetwork/lnd.git
synced 2025-09-19 12:01:27 +02:00
multi: extend lnpeer.Peer interface with Disconnect function
This will be used in the gossiper to disconnect from peers if their ban score passes the ban threshold.
This commit is contained in:
committed by
Olaoluwa Osuntokun
parent
b7c4a3cd18
commit
3e318b4187
@@ -79,3 +79,5 @@ func (m *MockPeer) RemoteFeatures() *lnwire.FeatureVector {
|
||||
args := m.Called()
|
||||
return args.Get(0).(*lnwire.FeatureVector)
|
||||
}
|
||||
|
||||
func (m *MockPeer) Disconnect(err error) {}
|
||||
|
@@ -74,4 +74,7 @@ type Peer interface {
|
||||
// by the remote peer. This allows sub-systems that use this interface
|
||||
// to gate their behavior off the set of negotiated feature bits.
|
||||
RemoteFeatures() *lnwire.FeatureVector
|
||||
|
||||
// Disconnect halts communication with the peer.
|
||||
Disconnect(error)
|
||||
}
|
||||
|
Reference in New Issue
Block a user