[object Object]

← back to Exo

if any peers changed from last time, we should always update the topology

8aab930498bd16ba0874cbbc10d336fe3038f1b3 · 2024-09-24 12:06:01 +0100 · Alex Cheema

Files touched

Diff

commit 8aab930498bd16ba0874cbbc10d336fe3038f1b3
Author: Alex Cheema <alexcheema123@gmail.com>
Date:   Tue Sep 24 12:06:01 2024 +0100

    if any peers changed from last time, we should always update the topology
---
 exo/orchestration/standard_node.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/exo/orchestration/standard_node.py b/exo/orchestration/standard_node.py
index 15e1e16d..76683f56 100644
--- a/exo/orchestration/standard_node.py
+++ b/exo/orchestration/standard_node.py
@@ -336,7 +336,7 @@ class StandardNode(Node):
       if failed_connects: print(f"Failed to connect peers: {_pretty(failed_connects)}")
 
     self.peers = next_peers
-    return len(peers_to_connect) > 0 or len(peers_to_disconnect) > 0
+    return len(peers_added) > 0 or len(peers_removed) > 0 or len(peers_updated) > 0
 
   async def periodic_topology_collection(self, interval: int):
     while True:

← b1cf1085 discovery should not include unhealthy peers  ·  back to Exo  ·  check before removing da06fb3c →