swarm/network/simulation: do not copy node mutex in UploadSnapshot (#19160)

pull/19164/head
Janoš Guljaš 6 years ago committed by Viktor Trón
parent 81babe1509
commit 872370e3bc
  1. 8
      swarm/network/simulation/node.go

@ -222,11 +222,11 @@ func (s *Simulation) UploadSnapshot(snapshotFile string, opts ...AddNodeOption)
//the snapshot probably has the property EnableMsgEvents not set
//just in case, set it to true!
//(we need this to wait for messages before uploading)
for _, n := range snap.Nodes {
n.Node.Config.EnableMsgEvents = true
n.Node.Config.Services = s.serviceNames
for i := range snap.Nodes {
snap.Nodes[i].Node.Config.EnableMsgEvents = true
snap.Nodes[i].Node.Config.Services = s.serviceNames
for _, o := range opts {
o(n.Node.Config)
o(snap.Nodes[i].Node.Config)
}
}

Loading…
Cancel
Save