aboutsummaryrefslogtreecommitdiffstats
path: root/swarm/network/simulation/simulation.go
diff options
context:
space:
mode:
Diffstat (limited to 'swarm/network/simulation/simulation.go')
-rw-r--r--swarm/network/simulation/simulation.go10
1 files changed, 5 insertions, 5 deletions
diff --git a/swarm/network/simulation/simulation.go b/swarm/network/simulation/simulation.go
index 096f7322c..f6d3ce229 100644
--- a/swarm/network/simulation/simulation.go
+++ b/swarm/network/simulation/simulation.go
@@ -25,7 +25,7 @@ import (
"github.com/ethereum/go-ethereum/log"
"github.com/ethereum/go-ethereum/node"
- "github.com/ethereum/go-ethereum/p2p/discover"
+ "github.com/ethereum/go-ethereum/p2p/enode"
"github.com/ethereum/go-ethereum/p2p/simulations"
"github.com/ethereum/go-ethereum/p2p/simulations/adapters"
)
@@ -45,8 +45,8 @@ type Simulation struct {
serviceNames []string
cleanupFuncs []func()
- buckets map[discover.NodeID]*sync.Map
- pivotNodeID *discover.NodeID
+ buckets map[enode.ID]*sync.Map
+ pivotNodeID *enode.ID
shutdownWG sync.WaitGroup
done chan struct{}
mu sync.RWMutex
@@ -70,7 +70,7 @@ type ServiceFunc func(ctx *adapters.ServiceContext, bucket *sync.Map) (s node.Se
// simulations.Network initialized with provided services.
func New(services map[string]ServiceFunc) (s *Simulation) {
s = &Simulation{
- buckets: make(map[discover.NodeID]*sync.Map),
+ buckets: make(map[enode.ID]*sync.Map),
done: make(chan struct{}),
}
@@ -112,7 +112,7 @@ type Result struct {
}
// Run calls the RunFunc function while taking care of
-// cancelation provided through the Context.
+// cancellation provided through the Context.
func (s *Simulation) Run(ctx context.Context, f RunFunc) (r Result) {
//if the option is set to run a HTTP server with the simulation,
//init the server and start it