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 <lorenzo@status.im>
This commit is contained in:
Hanno Cornelius 2022-09-20 21:02:20 +01:00 committed by GitHub
parent e8d77306c8
commit efe82eade2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 12 deletions

View File

@ -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