From 5293e9ab5e7f501447054421a82df2bf444f81b1 Mon Sep 17 00:00:00 2001 From: Luca | Serenita <70237279+eth2353@users.noreply.github.com> Date: Thu, 5 Sep 2024 12:53:18 +0200 Subject: [PATCH] Fix best_beacon_node property on MultiBeaconNode - fix ordering (#8) --- src/providers/multi_beacon_node.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/providers/multi_beacon_node.py b/src/providers/multi_beacon_node.py index e9a2832..611a31d 100644 --- a/src/providers/multi_beacon_node.py +++ b/src/providers/multi_beacon_node.py @@ -138,7 +138,7 @@ async def __aexit__(self, exc_type, exc_val, exc_tb): def best_beacon_node(self): return next( bn - for bn in sorted(self.beacon_nodes, key=lambda bn: bn.score) + for bn in sorted(self.beacon_nodes, key=lambda bn: bn.score, reverse=True) if bn.initialized )