mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-08-20 10:52:25 +00:00
p2p/simulations: fix a deadlock calling getRandomNode with lock
https://github.com/ethersphere/go-ethereum/issues/1198#issuecomment-462317407
This commit is contained in:
parent
e4111471d4
commit
080f4c26e0
1 changed files with 1 additions and 1 deletions
|
|
@ -461,7 +461,7 @@ func (net *Network) getRandomNode(ids []enode.ID, excludeIDs []enode.ID) *Node {
|
||||||
if l == 0 {
|
if l == 0 {
|
||||||
return nil
|
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 {
|
func filterIDs(ids []enode.ID, excludeIDs []enode.ID) []enode.ID {
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue