diff --git a/htlcswitch/interfaces.go b/htlcswitch/interfaces.go index 645b33dc0..1cd24f525 100644 --- a/htlcswitch/interfaces.go +++ b/htlcswitch/interfaces.go @@ -130,10 +130,6 @@ type Peer interface { // PubKey returns the serialize public key of the source peer. PubKey() [33]byte - - // Disconnect disconnects with peer if we have error which we can't - // properly handle. - Disconnect(reason error) } // ForwardingLog is an interface that represents a time series database which diff --git a/htlcswitch/link_test.go b/htlcswitch/link_test.go index e79b74ffe..e0f3c07e8 100644 --- a/htlcswitch/link_test.go +++ b/htlcswitch/link_test.go @@ -1396,6 +1396,8 @@ type mockPeer struct { quit chan struct{} } +var _ Peer = (*mockPeer)(nil) + func (m *mockPeer) SendMessage(msg lnwire.Message, sync bool) error { if m.disconnected { return fmt.Errorf("disconnected") @@ -1413,8 +1415,6 @@ func (m *mockPeer) WipeChannel(*wire.OutPoint) error { func (m *mockPeer) PubKey() [33]byte { return [33]byte{} } -func (m *mockPeer) Disconnect(reason error) { -} var _ Peer = (*mockPeer)(nil) diff --git a/htlcswitch/mock.go b/htlcswitch/mock.go index 49238b7a6..6c2c9af4f 100644 --- a/htlcswitch/mock.go +++ b/htlcswitch/mock.go @@ -506,12 +506,6 @@ func (s *mockServer) PubKey() [33]byte { return s.id } -func (s *mockServer) Disconnect(reason error) { - fmt.Printf("server %v disconnected due to %v\n", s.name, reason) - - s.t.Fatalf("server %v was disconnected: %v", s.name, reason) -} - func (s *mockServer) WipeChannel(*wire.OutPoint) error { return nil }