aboutsummaryrefslogtreecommitdiffstats
path: root/swarm
diff options
context:
space:
mode:
authorJanoš Guljaš <janos@users.noreply.github.com>2019-02-25 17:03:31 +0800
committerViktor Trón <viktor.tron@gmail.com>2019-02-25 17:03:31 +0800
commit872370e3bc3c753937784e33e32d499ec277ab5f (patch)
treee08ef585ad060725b3f29dde8c3945d82a490ddf /swarm
parent81babe15090e4ac8a8eea1cb07999f9700738786 (diff)
downloadgo-tangerine-872370e3bc3c753937784e33e32d499ec277ab5f.tar
go-tangerine-872370e3bc3c753937784e33e32d499ec277ab5f.tar.gz
go-tangerine-872370e3bc3c753937784e33e32d499ec277ab5f.tar.bz2
go-tangerine-872370e3bc3c753937784e33e32d499ec277ab5f.tar.lz
go-tangerine-872370e3bc3c753937784e33e32d499ec277ab5f.tar.xz
go-tangerine-872370e3bc3c753937784e33e32d499ec277ab5f.tar.zst
go-tangerine-872370e3bc3c753937784e33e32d499ec277ab5f.zip
swarm/network/simulation: do not copy node mutex in UploadSnapshot (#19160)
Diffstat (limited to 'swarm')
-rw-r--r--swarm/network/simulation/node.go8
1 files changed, 4 insertions, 4 deletions
diff --git a/swarm/network/simulation/node.go b/swarm/network/simulation/node.go
index 24afe51a4..4c3834de3 100644
--- a/swarm/network/simulation/node.go
+++ b/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)
}
}