diff --git a/main.py b/main.py index 4632ad6..588a97d 100644 --- a/main.py +++ b/main.py @@ -72,6 +72,9 @@ def _create_node( ) +# TODO this should take a graph / adjacency list as argument and set peers based on that. +# currently all nodes are connected to all other nodes, which scales with O(n!) and +# takes significant amounts of time and compute for even small n < 10. def _connect_nodes(nodes: Dict[str, MeshNodeConfig]) -> None: for src, dst in itertools.permutations(nodes.keys(), 2): nodes[dst].peers.append(nodes[src])