aboutsummaryrefslogtreecommitdiffstats
path: root/p2p/simulations/network_test.go
diff options
context:
space:
mode:
Diffstat (limited to 'p2p/simulations/network_test.go')
-rw-r--r--p2p/simulations/network_test.go10
1 files changed, 5 insertions, 5 deletions
diff --git a/p2p/simulations/network_test.go b/p2p/simulations/network_test.go
index f178bac50..f34935265 100644
--- a/p2p/simulations/network_test.go
+++ b/p2p/simulations/network_test.go
@@ -22,7 +22,7 @@ import (
"testing"
"time"
- "github.com/ethereum/go-ethereum/p2p/discover"
+ "github.com/ethereum/go-ethereum/p2p/enode"
"github.com/ethereum/go-ethereum/p2p/simulations/adapters"
)
@@ -39,7 +39,7 @@ func TestNetworkSimulation(t *testing.T) {
})
defer network.Shutdown()
nodeCount := 20
- ids := make([]discover.NodeID, nodeCount)
+ ids := make([]enode.ID, nodeCount)
for i := 0; i < nodeCount; i++ {
conf := adapters.RandomNodeConfig()
node, err := network.NewNodeWithConfig(conf)
@@ -64,7 +64,7 @@ func TestNetworkSimulation(t *testing.T) {
}
return nil
}
- check := func(ctx context.Context, id discover.NodeID) (bool, error) {
+ check := func(ctx context.Context, id enode.ID) (bool, error) {
// check we haven't run out of time
select {
case <-ctx.Done():
@@ -102,7 +102,7 @@ func TestNetworkSimulation(t *testing.T) {
defer cancel()
// trigger a check every 100ms
- trigger := make(chan discover.NodeID)
+ trigger := make(chan enode.ID)
go triggerChecks(ctx, ids, trigger, 100*time.Millisecond)
result := NewSimulation(network).Run(ctx, &Step{
@@ -140,7 +140,7 @@ func TestNetworkSimulation(t *testing.T) {
}
}
-func triggerChecks(ctx context.Context, ids []discover.NodeID, trigger chan discover.NodeID, interval time.Duration) {
+func triggerChecks(ctx context.Context, ids []enode.ID, trigger chan enode.ID, interval time.Duration) {
tick := time.NewTicker(interval)
defer tick.Stop()
for {