diff --git a/beacon_chain/networking/eth2_network.nim b/beacon_chain/networking/eth2_network.nim index d4df6738c..1446d3c0f 100644 --- a/beacon_chain/networking/eth2_network.nim +++ b/beacon_chain/networking/eth2_network.nim @@ -946,7 +946,7 @@ proc queryRandom*( filtered.add((score, n)) d.rng[].shuffle(filtered) - return filtered.sortedByIt(it[0]).mapIt(it[1]) + return filtered.sortedByIt(-it[0]).mapIt(it[1]) proc trimConnections(node: Eth2Node, count: int) {.async.} = # Kill `count` peers, scoring them to remove the least useful ones