diff --git a/p2p/simulations/connect.go b/p2p/simulations/connect.go index 5b7e62706c..4bfcd372b4 100644 --- a/p2p/simulations/connect.go +++ b/p2p/simulations/connect.go @@ -29,9 +29,9 @@ var ( ) // ConnectToPivotNode connects the node with provided NodeID -// to the pivot node, already set by Connections.SetPivotNode method. +// to the pivot node, already set by Network.SetPivotNode method. // It is useful when constructing a star network topology -// when Connections adds and removes nodes dynamically. +// when Network adds and removes nodes dynamically. func (net *Network) ConnectToPivotNode(id enode.ID) (err error) { pivot := net.PivotNodeID() if pivot == nil { diff --git a/p2p/simulations/connect_test.go b/p2p/simulations/connect_test.go index 1da4eba3a1..3dc69fa030 100644 --- a/p2p/simulations/connect_test.go +++ b/p2p/simulations/connect_test.go @@ -91,12 +91,7 @@ func TestConnectToLastNode(t *testing.T) { } if net.GetConn(first, id) != nil { - t.Errorf( - "connection must not exits with node(ind: %v, id: %v)", - i, - id, - ) - + t.Errorf("connection must not exits with node(ind: %v, id: %v)", i, id) } } diff --git a/swarm/network/stream/snapshot_sync_test.go b/swarm/network/stream/snapshot_sync_test.go index 18092e502a..5a66ee2343 100644 --- a/swarm/network/stream/snapshot_sync_test.go +++ b/swarm/network/stream/snapshot_sync_test.go @@ -248,7 +248,7 @@ func runSim(conf *synctestConfig, ctx context.Context, sim *simulation.Simulatio //get the node at that index //this is the node selected for upload - node := sim.RandomUpNode() + node := sim.Net.RandomUpNode() item, ok := sim.NodeItem(node.ID(), bucketKeyStore) if !ok { return fmt.Errorf("No localstore") @@ -453,7 +453,7 @@ func testSyncingViaDirectSubscribe(t *testing.T, chunkCount int, nodeCount int) } } //select a random node for upload - node := sim.RandomUpNode() + node := sim.Net.RandomUpNode() item, ok := sim.NodeItem(node.ID(), bucketKeyStore) if !ok { return fmt.Errorf("No localstore")