mirror of
https://github.com/status-im/nimbus-eth2.git
synced 2025-01-11 06:46:10 +00:00
Remove some warnings
This commit is contained in:
parent
5a2a52869e
commit
19847bbd20
@ -25,7 +25,7 @@ proc new*(T: type Eth2DiscoveryProtocol,
|
|||||||
pk = initPrivateKey(rawPrivKeyBytes)
|
pk = initPrivateKey(rawPrivKeyBytes)
|
||||||
db = DiscoveryDB.init(newMemoryDB())
|
db = DiscoveryDB.init(newMemoryDB())
|
||||||
|
|
||||||
newProtocol(pk, db, ip, Port conf.tcpPort, Port conf.udpPort)
|
newProtocol(pk, db, ip, conf.tcpPort, conf.udpPort)
|
||||||
|
|
||||||
proc toENode*(a: MultiAddress): Result[ENode, cstring] =
|
proc toENode*(a: MultiAddress): Result[ENode, cstring] =
|
||||||
if not IPFS.match(a):
|
if not IPFS.match(a):
|
||||||
|
@ -141,7 +141,7 @@ when networkBackend in [libp2p, libp2pDaemon]:
|
|||||||
bootstrapNodes: seq[ENode]): Future[Eth2Node] {.async.} =
|
bootstrapNodes: seq[ENode]): Future[Eth2Node] {.async.} =
|
||||||
var
|
var
|
||||||
(extIp, extTcpPort, _) = setupNat(conf)
|
(extIp, extTcpPort, _) = setupNat(conf)
|
||||||
hostAddress = tcpEndPoint(globalListeningAddr, Port conf.tcpPort)
|
hostAddress = tcpEndPoint(globalListeningAddr, conf.tcpPort)
|
||||||
announcedAddresses = if extIp == globalListeningAddr: @[]
|
announcedAddresses = if extIp == globalListeningAddr: @[]
|
||||||
else: @[tcpEndPoint(extIp, extTcpPort)]
|
else: @[tcpEndPoint(extIp, extTcpPort)]
|
||||||
|
|
||||||
|
@ -4,7 +4,7 @@ type
|
|||||||
libp2pDaemon
|
libp2pDaemon
|
||||||
|
|
||||||
const
|
const
|
||||||
NETWORK_TYPE {.strdefine.} = "libp2p_daemon"
|
NETWORK_TYPE {.strdefine.} = "libp2p"
|
||||||
|
|
||||||
networkBackend* = when NETWORK_TYPE == "libp2p": libp2p
|
networkBackend* = when NETWORK_TYPE == "libp2p": libp2p
|
||||||
elif NETWORK_TYPE == "libp2p_daemon": libp2pDaemon
|
elif NETWORK_TYPE == "libp2p_daemon": libp2pDaemon
|
||||||
|
Loading…
x
Reference in New Issue
Block a user