mirror of
https://github.com/status-im/nimbus-eth2.git
synced 2025-02-21 18:58:32 +00:00
Let also discovery used listen-address cli option instead of always any address (#1658)
This commit is contained in:
parent
61568e4335
commit
23bec99341
@ -97,9 +97,9 @@ type
|
||||
desc: "Specifies a line-delimited file of bootstrap Ethereum network addresses"
|
||||
name: "bootstrap-file" }: InputFile
|
||||
|
||||
libp2pAddress* {.
|
||||
listenAddress* {.
|
||||
defaultValue: defaultListenAddress(config)
|
||||
desc: "Listening address for the Ethereum LibP2P traffic"
|
||||
desc: "Listening address for the Ethereum LibP2P and Discovery v5 traffic"
|
||||
name: "listen-address" }: ValidIpAddress
|
||||
|
||||
tcpPort* {.
|
||||
|
@ -89,5 +89,5 @@ proc new*(T: type Eth2DiscoveryProtocol,
|
||||
if fileExists(persistentBootstrapFile):
|
||||
loadBootstrapFile(persistentBootstrapFile, bootstrapEnrs)
|
||||
|
||||
newProtocol(
|
||||
pk, ip, tcpPort, udpPort, enrFields, bootstrapEnrs, rng = rng)
|
||||
newProtocol(pk, ip, tcpPort, udpPort, enrFields, bootstrapEnrs,
|
||||
bindIp = conf.listenAddress, rng = rng)
|
||||
|
@ -1228,7 +1228,7 @@ proc createEth2Node*(
|
||||
enrForkId: ENRForkID): Eth2Node =
|
||||
var
|
||||
(extIp, extTcpPort, extUdpPort) = setupNat(conf)
|
||||
hostAddress = tcpEndPoint(conf.libp2pAddress, conf.tcpPort)
|
||||
hostAddress = tcpEndPoint(conf.listenAddress, conf.tcpPort)
|
||||
announcedAddresses = if extIp.isNone(): @[]
|
||||
else: @[tcpEndPoint(extIp.get(), extTcpPort)]
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user