p2p: fix tests with new ServerIf interface

This commit is contained in:
Guillaume Ballet 2018-09-29 11:43:10 +02:00
parent 397ae84a05
commit 6e6e05bbe6
6 changed files with 6 additions and 6 deletions

View file

@ -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
}

View file

@ -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()
}

View file

@ -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
}

View file

@ -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
}

View file

@ -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

View file

@ -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
}