diff options
author | Janoš Guljaš <janos@users.noreply.github.com> | 2018-11-26 19:39:38 +0800 |
---|---|---|
committer | Anton Evangelatov <anton.evangelatov@gmail.com> | 2018-11-26 19:39:38 +0800 |
commit | 93854bbad4fb819375463d04cf6b7e66b7f272f7 (patch) | |
tree | 83d2e79e1f542fcf26d5e8268477bbe515a52d8d /swarm/network/simulation/simulation_test.go | |
parent | f0515800e6e92044466b095bbb2374465c53b6f1 (diff) | |
download | go-tangerine-93854bbad4fb819375463d04cf6b7e66b7f272f7.tar go-tangerine-93854bbad4fb819375463d04cf6b7e66b7f272f7.tar.gz go-tangerine-93854bbad4fb819375463d04cf6b7e66b7f272f7.tar.bz2 go-tangerine-93854bbad4fb819375463d04cf6b7e66b7f272f7.tar.lz go-tangerine-93854bbad4fb819375463d04cf6b7e66b7f272f7.tar.xz go-tangerine-93854bbad4fb819375463d04cf6b7e66b7f272f7.tar.zst go-tangerine-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.go | 13 |
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 +} |