From 080f4c26e0bef5c7a7f7c9b70c736167a349a8f4 Mon Sep 17 00:00:00 2001 From: Janos Guljas Date: Mon, 11 Feb 2019 14:00:10 +0100 Subject: [PATCH] p2p/simulations: fix a deadlock calling getRandomNode with lock https://github.com/ethersphere/go-ethereum/issues/1198#issuecomment-462317407 --- p2p/simulations/network.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/p2p/simulations/network.go b/p2p/simulations/network.go index c2a3b9647f..d99633c9d7 100644 --- a/p2p/simulations/network.go +++ b/p2p/simulations/network.go @@ -461,7 +461,7 @@ func (net *Network) getRandomNode(ids []enode.ID, excludeIDs []enode.ID) *Node { if l == 0 { return nil } - return net.GetNode(filtered[rand.Intn(l)]) + return net.getNode(filtered[rand.Intn(l)]) } func filterIDs(ids []enode.ID, excludeIDs []enode.ID) []enode.ID {