diff --git a/p2p/simulations/adapters/exec.go b/p2p/simulations/adapters/exec.go index dc7d277cac..cc96f83e85 100644 --- a/p2p/simulations/adapters/exec.go +++ b/p2p/simulations/adapters/exec.go @@ -457,7 +457,7 @@ func (s *snapshotService) Protocols() []p2p.Protocol { return nil } -func (s *snapshotService) Start(*p2p.Server) error { +func (s *snapshotService) Start(p2p.ServerIf) error { return nil } diff --git a/p2p/simulations/adapters/inproc.go b/p2p/simulations/adapters/inproc.go index 52a662be63..db1bc6f5dc 100644 --- a/p2p/simulations/adapters/inproc.go +++ b/p2p/simulations/adapters/inproc.go @@ -326,7 +326,7 @@ func (sn *SimNode) ServiceMap() map[string]node.Service { } // Server returns the underlying p2p.Server -func (sn *SimNode) Server() *p2p.Server { +func (sn *SimNode) Server() p2p.ServerIf { return sn.node.Server() } diff --git a/p2p/simulations/examples/ping-pong.go b/p2p/simulations/examples/ping-pong.go index 597cc950c9..fcd4ee8dc9 100644 --- a/p2p/simulations/examples/ping-pong.go +++ b/p2p/simulations/examples/ping-pong.go @@ -122,7 +122,7 @@ func (p *pingPongService) APIs() []rpc.API { return nil } -func (p *pingPongService) Start(server *p2p.Server) error { +func (p *pingPongService) Start(server p2p.ServerIf) error { p.log.Info("ping-pong service starting") return nil } diff --git a/p2p/simulations/http_test.go b/p2p/simulations/http_test.go index 7bdbad1b53..9b3e334012 100644 --- a/p2p/simulations/http_test.go +++ b/p2p/simulations/http_test.go @@ -113,7 +113,7 @@ func (t *testService) APIs() []rpc.API { }} } -func (t *testService) Start(server *p2p.Server) error { +func (t *testService) Start(server p2p.ServerIf) error { return nil } diff --git a/p2p/testing/protocolsession.go b/p2p/testing/protocolsession.go index 476c2a9840..c46998fb91 100644 --- a/p2p/testing/protocolsession.go +++ b/p2p/testing/protocolsession.go @@ -34,7 +34,7 @@ var errTimedOut = errors.New("timed out") // a service and a number of dummy peers that can send (trigger) or // receive (expect) messages type ProtocolSession struct { - Server *p2p.Server + Server p2p.ServerIf Nodes []*enode.Node adapter *adapters.SimAdapter events chan *p2p.PeerEvent diff --git a/p2p/testing/protocoltester.go b/p2p/testing/protocoltester.go index afc03b009f..3c7631e24c 100644 --- a/p2p/testing/protocoltester.go +++ b/p2p/testing/protocoltester.go @@ -142,7 +142,7 @@ func (t *testNode) APIs() []rpc.API { return nil } -func (t *testNode) Start(server *p2p.Server) error { +func (t *testNode) Start(server p2p.ServerIf) error { return nil }