From efe82eade2d7f8c4d5ee74080724364f20bca445 Mon Sep 17 00:00:00 2001 From: Hanno Cornelius <68783915+jm-clius@users.noreply.github.com> Date: Tue, 20 Sep 2022 21:02:20 +0100 Subject: [PATCH] fix: no need to start protocols twice (#1162) * fix: no need to start protocols twice * fix: relay should still be explicitly started Co-authored-by: Lorenzo Delgado --- waku/v2/node/wakunode2.nim | 14 ++------------ 1 file changed, 2 insertions(+), 12 deletions(-) diff --git a/waku/v2/node/wakunode2.nim b/waku/v2/node/wakunode2.nim index a07081499..00577bcb5 100644 --- a/waku/v2/node/wakunode2.nim +++ b/waku/v2/node/wakunode2.nim @@ -759,20 +759,10 @@ proc start*(node: WakuNode) {.async.} = ## Update switch peer info with announced addrs node.updateSwitchPeerInfo() - # Start mounted protocols. For now we start each one explicitly + # Perform relay-specific startup tasks TODO: this should be rethought if not node.wakuRelay.isNil: await node.startRelay() - if not node.wakuStore.isNil: - await node.wakuStore.start() - if not node.wakuFilter.isNil: - await node.wakuFilter.start() - if not node.wakuLightPush.isNil: - await node.wakuLightPush.start() - if not node.wakuSwap.isNil: - await node.wakuSwap.start() - if not node.libp2pPing.isNil: - await node.libp2pPing.start() - + await node.switch.start() node.started = true