Skip to content

Commit

Permalink
Fix listenAddress should be Opt[T] not Option[T].
Browse files Browse the repository at this point in the history
  • Loading branch information
cheatfate committed Apr 25, 2024
1 parent fd87e04 commit 73d0fb8
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion beacon_chain/networking/eth2_discovery.nim
Original file line number Diff line number Diff line change
Expand Up @@ -96,8 +96,14 @@ proc new*(T: type Eth2DiscoveryProtocol,
if fileExists(persistentBootstrapFile):
loadBootstrapFile(persistentBootstrapFile, bootstrapEnrs)

let listenAddress =
if config.listenAddress.isSome():
Opt.some(config.listenAddress.get())
else:
Opt.none(IpAddress)

newProtocol(pk, enrIp, enrTcpPort, enrUdpPort, enrFields, bootstrapEnrs,
bindPort = config.udpPort, bindIp = config.listenAddress,
bindPort = config.udpPort, bindIp = listenAddress,
enrAutoUpdate = config.enrAutoUpdate, rng = rng)

func isCompatibleForkId*(discoveryForkId: ENRForkID, peerForkId: ENRForkID): bool =
Expand Down

0 comments on commit 73d0fb8

Please sign in to comment.