mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-08-19 10:22:23 +00:00
p2p: fix tests with new ServerIf interface
This commit is contained in:
parent
397ae84a05
commit
6e6e05bbe6
6 changed files with 6 additions and 6 deletions
|
|
@ -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
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -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()
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -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
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue