We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent d901911 commit 6845945Copy full SHA for 6845945
swarm/network/networkid_test.go
@@ -76,13 +76,12 @@ func TestNetworkID(t *testing.T) {
76
if err != nil {
77
t.Fatalf("Error setting up network: %v", err)
78
}
79
- defer func() {
80
- //shutdown the snapshot network
81
- log.Trace("Shutting down network")
82
- net.Shutdown()
83
- }()
84
//let's sleep to ensure all nodes are connected
85
time.Sleep(1 * time.Second)
+ // shutdown the the network to avoid race conditions
+ // on accessing kademlias global map while network nodes
+ // are accepting messages
+ net.Shutdown()
86
//for each group sharing the same network ID...
87
for _, netIDGroup := range nodeMap {
88
log.Trace("netIDGroup size", "size", len(netIDGroup))
0 commit comments