Use the latest Chronos and Libp2p
This commit is contained in:
parent
b80a5b90df
commit
86a3bea1ec
|
@ -828,7 +828,7 @@ proc p2pProtocolBackendImpl*(p: P2PProtocol): Backend =
|
||||||
|
|
||||||
proc setupNat(conf: BeaconNodeConf): tuple[ip: IpAddress,
|
proc setupNat(conf: BeaconNodeConf): tuple[ip: IpAddress,
|
||||||
tcpPort: Port,
|
tcpPort: Port,
|
||||||
udpPort: Port] =
|
udpPort: Port] {.gcsafe.} =
|
||||||
# defaults
|
# defaults
|
||||||
result.ip = globalListeningAddr
|
result.ip = globalListeningAddr
|
||||||
result.tcpPort = conf.tcpPort
|
result.tcpPort = conf.tcpPort
|
||||||
|
@ -857,9 +857,12 @@ proc setupNat(conf: BeaconNodeConf): tuple[ip: IpAddress,
|
||||||
let extIP = getExternalIP(nat)
|
let extIP = getExternalIP(nat)
|
||||||
if extIP.isSome:
|
if extIP.isSome:
|
||||||
result.ip = extIP.get()
|
result.ip = extIP.get()
|
||||||
let extPorts = redirectPorts(tcpPort = result.tcpPort,
|
# TODO redirectPorts in considered a gcsafety violation
|
||||||
udpPort = result.udpPort,
|
# because it obtains the address of a non-gcsafe proc?
|
||||||
description = clientId)
|
let extPorts = ({.gcsafe.}:
|
||||||
|
redirectPorts(tcpPort = result.tcpPort,
|
||||||
|
udpPort = result.udpPort,
|
||||||
|
description = clientId))
|
||||||
if extPorts.isSome:
|
if extPorts.isSome:
|
||||||
(result.tcpPort, result.udpPort) = extPorts.get()
|
(result.tcpPort, result.udpPort) = extPorts.get()
|
||||||
|
|
||||||
|
@ -893,7 +896,7 @@ proc getPersistentNetKeys*(conf: BeaconNodeConf): KeyPair =
|
||||||
|
|
||||||
KeyPair(seckey: privKey, pubkey: privKey.getKey())
|
KeyPair(seckey: privKey, pubkey: privKey.getKey())
|
||||||
|
|
||||||
proc createEth2Node*(conf: BeaconNodeConf): Future[Eth2Node] {.async.} =
|
proc createEth2Node*(conf: BeaconNodeConf): Future[Eth2Node] {.async, gcsafe.} =
|
||||||
var
|
var
|
||||||
(extIp, extTcpPort, _) = setupNat(conf)
|
(extIp, extTcpPort, _) = setupNat(conf)
|
||||||
hostAddress = tcpEndPoint(conf.libp2pAddress, conf.tcpPort)
|
hostAddress = tcpEndPoint(conf.libp2pAddress, conf.tcpPort)
|
||||||
|
|
|
@ -1 +1 @@
|
||||||
Subproject commit 7ed9f1431a0a8262f988553e9927676cad54e470
|
Subproject commit f3827a13d12f27e20874df81dc99b55e5dc78244
|
|
@ -1 +1 @@
|
||||||
Subproject commit 0a3e4a764b718d13fc330f228fce60ed265cfde2
|
Subproject commit a2acdd7933ff411bb6f4133d90bb46caec6127dc
|
|
@ -1 +1 @@
|
||||||
Subproject commit ab1d8891ef11e4c310c071213bd67aa5ac4b421d
|
Subproject commit 19c87b7dc91dfbc0b6823a3d2996869397dd34e6
|
Loading…
Reference in New Issue