patch for manual discovery, set known_peers

This commit is contained in:
Alex Cheema
2025-02-01 23:06:57 +00:00
parent f663b0afa2
commit 72329ba984

View File

@@ -63,6 +63,7 @@ class ManualDiscovery(Discovery):
print(f"{peer_id=} at {peer_config.address}:{peer_config.port} is not healthy. Removing.") print(f"{peer_id=} at {peer_config.address}:{peer_config.port} is not healthy. Removing.")
except Exception as e: except Exception as e:
if DEBUG_DISCOVERY >= 2: print(f"Exception occurred when attempting to add {peer_id=}: {e}") if DEBUG_DISCOVERY >= 2: print(f"Exception occurred when attempting to add {peer_id=}: {e}")
self.known_peers = new_known_peers
await asyncio.sleep(5.0) await asyncio.sleep(5.0)
if DEBUG_DISCOVERY >= 2: print(f"Current known peers: {[peer.id() for peer in self.known_peers.values()]}") if DEBUG_DISCOVERY >= 2: print(f"Current known peers: {[peer.id() for peer in self.known_peers.values()]}")