Skip to content
This repository has been archived by the owner on Aug 2, 2021. It is now read-only.

Commit

Permalink
cmd/swarm-snapshot: if 2 nodes to create snapshot use connectChain (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
aperonam authored and acud committed Aug 30, 2019
1 parent dec28cd commit f13e647
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion cmd/swarm-snapshot/create.go
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,12 @@ func createSnapshot(filename string, nodes int, services []string) (err error) {
return fmt.Errorf("add nodes: %v", err)
}

err = sim.Net.ConnectNodesRing(ids)
if nodes == 2 {
err = sim.Net.ConnectNodesChain(ids)
} else {
err = sim.Net.ConnectNodesRing(ids)
}

if err != nil {
return fmt.Errorf("connect nodes: %v", err)
}
Expand Down

0 comments on commit f13e647

Please sign in to comment.