From 1b916f89c154e76b8733db51ab738f6eaec0ab39 Mon Sep 17 00:00:00 2001 From: Elad Nachmias Date: Wed, 16 Jan 2019 20:44:50 +0530 Subject: [PATCH] swarm/network: fix data race on TestService bucket caused by copying struct content without synchronisation --- p2p/simulations/events.go | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/p2p/simulations/events.go b/p2p/simulations/events.go index 9b2a990e07..1f40c9437d 100644 --- a/p2p/simulations/events.go +++ b/p2p/simulations/events.go @@ -73,8 +73,7 @@ func NewEvent(v interface{}) *Event { switch v := v.(type) { case *Node: event.Type = EventTypeNode - node := *v - event.Node = &node + event.Node = v case *Conn: event.Type = EventTypeConn conn := *v