mirror of
https://github.com/lightningnetwork/lnd.git
synced 2025-11-10 06:07:16 +01: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:
@@ -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