← back to Exo
remove origin_node_id
db7c388ac61f7edeab57deef8681ea769332d31b · 2024-12-05 23:03:18 +0000 · Alex Cheema
Files touched
M exo/orchestration/standard_node.pyM exo/topology/topology.py
Diff
commit db7c388ac61f7edeab57deef8681ea769332d31b
Author: Alex Cheema <alexcheema123@gmail.com>
Date: Thu Dec 5 23:03:18 2024 +0000
remove origin_node_id
---
exo/orchestration/standard_node.py | 2 +-
exo/topology/topology.py | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/exo/orchestration/standard_node.py b/exo/orchestration/standard_node.py
index 5ba3b632..dbb146a8 100644
--- a/exo/orchestration/standard_node.py
+++ b/exo/orchestration/standard_node.py
@@ -410,7 +410,7 @@ class StandardNode(Node):
try:
other_topology = await asyncio.wait_for(peer.collect_topology(visited, max_depth=max_depth - 1), timeout=5.0)
if DEBUG >= 2: print(f"Collected topology from: {peer.id()}: {other_topology}")
- next_topology.merge(self.id, other_topology)
+ next_topology.merge(other_topology)
except Exception as e:
print(f"Error collecting topology from {peer.id()}: {e}")
traceback.print_exc()
diff --git a/exo/topology/topology.py b/exo/topology/topology.py
index 6040369f..a002cdc1 100644
--- a/exo/topology/topology.py
+++ b/exo/topology/topology.py
@@ -39,14 +39,12 @@ class Topology:
conn = PeerConnection(from_id, to_id, description)
self.peer_graph[from_id].add(conn)
- def merge(self, origin_node_id: str, other: "Topology"):
+ def merge(self, other: "Topology"):
for node_id, capabilities in other.nodes.items():
- if node_id != origin_node_id:
- self.update_node(node_id, capabilities)
+ self.update_node(node_id, capabilities)
for node_id, connections in other.peer_graph.items():
for conn in connections:
- if conn.from_id != origin_node_id:
- self.add_edge(conn.from_id, conn.to_id, conn.description)
+ self.add_edge(conn.from_id, conn.to_id, conn.description)
def __str__(self):
nodes_str = ", ".join(f"{node_id}: {cap}" for node_id, cap in self.nodes.items())
← 55344241 use double for flops protobuf
·
back to Exo
·
fix noopsharddownloader 97373d53 →