From 8ac686ea9ef4b61171dd2346888b805725027875 Mon Sep 17 00:00:00 2001 From: Oskar Thoren Date: Thu, 21 May 2020 12:36:30 +0800 Subject: [PATCH] Setup starNetwork and multitail sim orchestration --- waku/node/v2/start_network.nim | 29 +++++++++++++++++++++++------ 1 file changed, 23 insertions(+), 6 deletions(-) diff --git a/waku/node/v2/start_network.nim b/waku/node/v2/start_network.nim index 8282ed2d4..48d34c9dc 100644 --- a/waku/node/v2/start_network.nim +++ b/waku/node/v2/start_network.nim @@ -59,10 +59,27 @@ proc initNodeCmd(shift: int, staticNodes: seq[string] = @[], master = false, lab info "Node command created.", cmd=result.cmd, address = result.address -# TODO: Setup diff topology, star, mesh, etc -let masterNode = initNodeCmd(portOffset, @[], "master node") -let otherNode = initNodeCmd(portOFfset + 1, @[masterNode.address], "other node") +proc starNetwork(amount: int): seq[NodeInfo] = + let masterNode = initNodeCmd(portOffset, master = true, label = "master node") + result.add(masterNode) + for i in 1..