htlcswitch: remove unused Disconnect from Peer interface
This commit is contained in:
parent
f95ae1cdd6
commit
4dfb4547a0
@ -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
|
||||
|
@ -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)
|
||||
|
||||
|
@ -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
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user