mirror of https://github.com/waku-org/nwaku.git
fix: start px discv5 loop after discv5 has started (#1407)
This commit is contained in:
parent
63fe1351f5
commit
6942e466e8
|
@ -440,8 +440,6 @@ proc setupProtocols(node: WakuNode, conf: WakuNodeConf,
|
||||||
except:
|
except:
|
||||||
return err("failed to mount waku peer-exchange protocol: " & getCurrentExceptionMsg())
|
return err("failed to mount waku peer-exchange protocol: " & getCurrentExceptionMsg())
|
||||||
|
|
||||||
asyncSpawn runPeerExchangeDiscv5Loop(node.wakuPeerExchange)
|
|
||||||
|
|
||||||
if conf.peerExchangeNode != "":
|
if conf.peerExchangeNode != "":
|
||||||
try:
|
try:
|
||||||
setPeerExchangePeer(node, conf.peerExchangeNode)
|
setPeerExchangePeer(node, conf.peerExchangeNode)
|
||||||
|
@ -484,6 +482,9 @@ proc startNode(node: WakuNode, conf: WakuNodeConf,
|
||||||
except:
|
except:
|
||||||
return err("failed to connect to dynamic bootstrap nodes: " & getCurrentExceptionMsg())
|
return err("failed to connect to dynamic bootstrap nodes: " & getCurrentExceptionMsg())
|
||||||
|
|
||||||
|
if conf.peerExchange:
|
||||||
|
asyncSpawn runPeerExchangeDiscv5Loop(node.wakuPeerExchange)
|
||||||
|
|
||||||
# retrieve and connect to peer exchange peers
|
# retrieve and connect to peer exchange peers
|
||||||
if conf.peerExchangeNode != "":
|
if conf.peerExchangeNode != "":
|
||||||
info "Retrieving peer info via peer exchange protocol"
|
info "Retrieving peer info via peer exchange protocol"
|
||||||
|
|
Loading…
Reference in New Issue