mirror of https://github.com/waku-org/nwaku.git
chore: upgrade peer exchange mounting (#2953)
This commit is contained in:
parent
f534549a1e
commit
42f1bed04c
|
@ -338,20 +338,20 @@ proc setupProtocols(
|
|||
return err("failed to set node waku filter peer: " & filterNode.error)
|
||||
|
||||
# waku peer exchange setup
|
||||
if conf.peerExchangeNode != "" or conf.peerExchange:
|
||||
if conf.peerExchange:
|
||||
try:
|
||||
await mountPeerExchange(node, some(conf.clusterId))
|
||||
except CatchableError:
|
||||
return
|
||||
err("failed to mount waku peer-exchange protocol: " & getCurrentExceptionMsg())
|
||||
|
||||
if conf.peerExchangeNode != "":
|
||||
let peerExchangeNode = parsePeerInfo(conf.peerExchangeNode)
|
||||
if peerExchangeNode.isOk():
|
||||
node.peerManager.addServicePeer(peerExchangeNode.value, WakuPeerExchangeCodec)
|
||||
else:
|
||||
return
|
||||
err("failed to set node waku peer-exchange peer: " & peerExchangeNode.error)
|
||||
if conf.peerExchangeNode != "":
|
||||
let peerExchangeNode = parsePeerInfo(conf.peerExchangeNode)
|
||||
if peerExchangeNode.isOk():
|
||||
node.peerManager.addServicePeer(peerExchangeNode.value, WakuPeerExchangeCodec)
|
||||
else:
|
||||
return
|
||||
err("failed to set node waku peer-exchange peer: " & peerExchangeNode.error)
|
||||
|
||||
return ok()
|
||||
|
||||
|
|
Loading…
Reference in New Issue