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

Commit

Permalink
p2p/simulations: fix a deadlock calling getRandomNode with lock
Browse files Browse the repository at this point in the history
  • Loading branch information
janos committed Feb 11, 2019
1 parent e411147 commit 080f4c2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion p2p/simulations/network.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down

0 comments on commit 080f4c2

Please sign in to comment.