aboutsummaryrefslogtreecommitdiffstats
path: root/swarm/network/simulation/simulation_test.go
diff options
context:
space:
mode:
authorJanoš Guljaš <janos@users.noreply.github.com>2018-11-26 19:39:38 +0800
committerAnton Evangelatov <anton.evangelatov@gmail.com>2018-11-26 19:39:38 +0800
commit93854bbad4fb819375463d04cf6b7e66b7f272f7 (patch)
tree83d2e79e1f542fcf26d5e8268477bbe515a52d8d /swarm/network/simulation/simulation_test.go
parentf0515800e6e92044466b095bbb2374465c53b6f1 (diff)
downloaddexon-93854bbad4fb819375463d04cf6b7e66b7f272f7.tar.gz
dexon-93854bbad4fb819375463d04cf6b7e66b7f272f7.tar.zst
dexon-93854bbad4fb819375463d04cf6b7e66b7f272f7.zip
swarm/network/simulation: fix New function for-loop scope (#18161)
Diffstat (limited to 'swarm/network/simulation/simulation_test.go')
-rw-r--r--swarm/network/simulation/simulation_test.go13
1 files changed, 13 insertions, 0 deletions
diff --git a/swarm/network/simulation/simulation_test.go b/swarm/network/simulation/simulation_test.go
index eed09bf50..ca8599d7c 100644
--- a/swarm/network/simulation/simulation_test.go
+++ b/swarm/network/simulation/simulation_test.go
@@ -205,3 +205,16 @@ func (t *noopService) Start(server *p2p.Server) error {
func (t *noopService) Stop() error {
return nil
}
+
+// 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
+// but implements node.Service interface.
+type noopService2 struct {
+ noopService
+}