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:
Eugene Siegel
2024-08-14 14:03:39 -04:00
parent 0173e4c44d
commit 99b86ba462
8 changed files with 78 additions and 30 deletions

View File

@@ -684,6 +684,8 @@ func (s *mockServer) RemoteFeatures() *lnwire.FeatureVector {
return nil
}
func (s *mockServer) Disconnect(err error) {}
func (s *mockServer) Stop() error {
if !atomic.CompareAndSwapInt32(&s.shutdown, 0, 1) {
return nil