fix: start px discv5 loop after discv5 has started (#1407)

This commit is contained in:
kaiserd 2022-11-25 14:15:39 +01:00 committed by GitHub
parent 63fe1351f5
commit 6942e466e8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 2 deletions

View File

@ -440,8 +440,6 @@ proc setupProtocols(node: WakuNode, conf: WakuNodeConf,
except:
return err("failed to mount waku peer-exchange protocol: " & getCurrentExceptionMsg())
asyncSpawn runPeerExchangeDiscv5Loop(node.wakuPeerExchange)
if conf.peerExchangeNode != "":
try:
setPeerExchangePeer(node, conf.peerExchangeNode)
@ -484,6 +482,9 @@ proc startNode(node: WakuNode, conf: WakuNodeConf,
except:
return err("failed to connect to dynamic bootstrap nodes: " & getCurrentExceptionMsg())
if conf.peerExchange:
asyncSpawn runPeerExchangeDiscv5Loop(node.wakuPeerExchange)
# retrieve and connect to peer exchange peers
if conf.peerExchangeNode != "":
info "Retrieving peer info via peer exchange protocol"