swarm/network/simulation: More PR comments

This commit is contained in:
Fabio Barone 2019-02-26 11:57:45 -05:00
parent 9f6cbd858b
commit 0562e4da7d

View file

@ -49,13 +49,11 @@ func TestWaitTillHealthy(t *testing.T) {
sim := New(createSimServiceMap(true)) sim := New(createSimServiceMap(true))
// connect and... // connect and...
_, err := sim.AddNodesAndConnectRing(testNodesNum) nodeIDs, err := sim.AddNodesAndConnectRing(testNodesNum)
if err != nil { if err != nil {
t.Fatal(err) t.Fatal(err)
} }
// for each node...
nodeIDs := sim.UpNodeIDs()
// array of all overlay addresses // array of all overlay addresses
var addrs [][]byte var addrs [][]byte
// iterate once to be able to build the peer map // iterate once to be able to build the peer map
@ -78,10 +76,8 @@ func TestWaitTillHealthy(t *testing.T) {
t.Log("Node", id) t.Log("Node", id)
t.Log(kad.String()) t.Log(kad.String())
} }
if err != nil {
t.Fatal(err) t.Fatal(err)
} }
}
// now create a snapshot of this network // now create a snapshot of this network
snap, err := sim.Net.Snapshot() snap, err := sim.Net.Snapshot()