From ae0574fe61d97facf5a08c1708a2ed33a029443b Mon Sep 17 00:00:00 2001 From: Kim De Mey Date: Mon, 29 Nov 2021 22:13:08 +0100 Subject: [PATCH] Adjust logging when node is not reachable but enrAutoUpdate is on (#436) Separate the logging when the node is not reachable and enrAutoUpdate is on or off to avoid confusion whether or not the node might still become reachable. --- eth/p2p/discoveryv5/protocol.nim | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/eth/p2p/discoveryv5/protocol.nim b/eth/p2p/discoveryv5/protocol.nim index 5e3a495..fa738b5 100644 --- a/eth/p2p/discoveryv5/protocol.nim +++ b/eth/p2p/discoveryv5/protocol.nim @@ -911,7 +911,11 @@ proc newProtocol*(privKey: PrivateKey, info "ENR initialized", ip = enrIp, tcp = enrTcpPort, udp = enrUdpPort, seqNum = record.seqNum, uri = toURI(record) if enrIp.isNone(): - warn "No external IP provided for the ENR, this node will not be discoverable" + if enrAutoUpdate: + notice "No external IP provided for the ENR, this node will not be " & + "discoverable until the ENR is updated with the discovered external IP address" + else: + warn "No external IP provided for the ENR, this node will not be discoverable" let node = newNode(record).expect("Properly initialized record")