aboutsummaryrefslogtreecommitdiffstats
path: root/swarm
diff options
context:
space:
mode:
Diffstat (limited to 'swarm')
-rw-r--r--swarm/network/simulation/simulation_test.go35
1 files changed, 9 insertions, 26 deletions
diff --git a/swarm/network/simulation/simulation_test.go b/swarm/network/simulation/simulation_test.go
index ca8599d7c..4667a2abc 100644
--- a/swarm/network/simulation/simulation_test.go
+++ b/swarm/network/simulation/simulation_test.go
@@ -26,9 +26,8 @@ import (
"github.com/ethereum/go-ethereum/log"
"github.com/ethereum/go-ethereum/node"
- "github.com/ethereum/go-ethereum/p2p"
+ "github.com/ethereum/go-ethereum/p2p/simulations"
"github.com/ethereum/go-ethereum/p2p/simulations/adapters"
- "github.com/ethereum/go-ethereum/rpc"
colorable "github.com/mattn/go-colorable"
)
@@ -182,39 +181,23 @@ func noopServiceFunc(ctx *adapters.ServiceContext, b *sync.Map) (node.Service, f
return newNoopService(), nil, nil
}
-// noopService is the service that does not do anything
-// but implements node.Service interface.
-type noopService struct{}
-
func newNoopService() node.Service {
return &noopService{}
}
-func (t *noopService) Protocols() []p2p.Protocol {
- return []p2p.Protocol{}
-}
-
-func (t *noopService) APIs() []rpc.API {
- return []rpc.API{}
-}
-
-func (t *noopService) Start(server *p2p.Server) error {
- return nil
-}
-
-func (t *noopService) Stop() error {
- return nil
-}
-
-// a helper function for most basic noop service
-// of a different type then noopService to test
+// a helper function for most basic Noop service
+// of a different type then NoopService to test
// multiple services on one node.
func noopService2Func(ctx *adapters.ServiceContext, b *sync.Map) (node.Service, func(), error) {
return new(noopService2), nil, nil
}
-// noopService2 is the service that does not do anything
+// NoopService2 is the service that does not do anything
// but implements node.Service interface.
type noopService2 struct {
- noopService
+ simulations.NoopService
+}
+
+type noopService struct {
+ simulations.NoopService
}