mirror of https://github.com/waku-org/nwaku.git
fix: fail to start switch with ext ip (#1181)
This commit is contained in:
parent
ca1718c504
commit
6b86c4a22a
|
@ -760,7 +760,10 @@ proc start*(node: WakuNode) {.async.} =
|
|||
##
|
||||
## Status: Implemented.
|
||||
|
||||
# TODO Get this from WakuNode obj
|
||||
## NB: careful when moving this. We need to start the switch with the bind address
|
||||
## BEFORE updating with announced addresses for the sake of identify.
|
||||
await node.switch.start()
|
||||
|
||||
let peerInfo = node.switch.peerInfo
|
||||
info "PeerInfo", peerId = peerInfo.peerId, addrs = peerInfo.addrs
|
||||
var listenStr = ""
|
||||
|
@ -772,14 +775,13 @@ proc start*(node: WakuNode) {.async.} =
|
|||
info "Listening on", full = listenStr
|
||||
info "DNS: discoverable ENR ", enr = node.enr.toUri()
|
||||
|
||||
## Update switch peer info with announced addrs
|
||||
node.updateSwitchPeerInfo()
|
||||
|
||||
# Perform relay-specific startup tasks TODO: this should be rethought
|
||||
if not node.wakuRelay.isNil:
|
||||
await node.startRelay()
|
||||
|
||||
await node.switch.start()
|
||||
## Update switch peer info with announced addrs
|
||||
node.updateSwitchPeerInfo()
|
||||
|
||||
node.started = true
|
||||
|
||||
info "Node started successfully"
|
||||
|
|
Loading…
Reference in New Issue