mirror of
https://github.com/logos-messaging/logos-messaging-nim.git
synced 2026-01-22 07:43:10 +00:00
fix issue with extMultiAddrsOnly flag
This commit is contained in:
parent
da08d7f216
commit
e48b89f0b5
@ -186,6 +186,9 @@ proc new*(
|
||||
error "Failed setting up node", error = $error
|
||||
return err("Failed setting up node: " & $error)
|
||||
|
||||
# Set the extMultiAddrsOnly flag so the node knows not to replace explicit addresses
|
||||
node.extMultiAddrsOnly = wakuConf.endpointConf.extMultiAddrsOnly
|
||||
|
||||
healthMonitor.setNodeToHealthMonitor(node)
|
||||
healthMonitor.onlineMonitor.setPeerStoreToOnlineMonitor(node.switch.peerStore)
|
||||
healthMonitor.onlineMonitor.addOnlineStateObserver(
|
||||
|
||||
@ -126,6 +126,7 @@ type
|
||||
wakuRendezvous*: WakuRendezVous
|
||||
wakuRendezvousClient*: rendezvous_client.WakuRendezVousClient
|
||||
announcedAddresses*: seq[MultiAddress]
|
||||
extMultiAddrsOnly*: bool # When true, skip automatic IP address replacement
|
||||
started*: bool # Indicates that node has started listening
|
||||
topicSubscriptionQueue*: AsyncEventQueue[SubscriptionEvent]
|
||||
rateLimitSettings*: ProtocolRateLimitSettings
|
||||
@ -403,6 +404,11 @@ proc isBindIpWithZeroPort(inputMultiAdd: MultiAddress): bool =
|
||||
return false
|
||||
|
||||
proc updateAnnouncedAddrWithPrimaryIpAddr*(node: WakuNode): Result[void, string] =
|
||||
# Skip automatic IP replacement if extMultiAddrsOnly is set
|
||||
# This respects the user's explicitly configured announced addresses
|
||||
if node.extMultiAddrsOnly:
|
||||
return ok()
|
||||
|
||||
let peerInfo = node.switch.peerInfo
|
||||
var announcedStr = ""
|
||||
var listenStr = ""
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user