mirror of https://github.com/waku-org/nwaku.git
Use config nodekey for deterministic node id from CLI
This commit is contained in:
parent
3d69658dab
commit
438f2ecab2
|
@ -144,13 +144,10 @@ proc run(config: WakuNodeConf) =
|
||||||
hostAddress = MultiAddress.init(DefaultAddr)
|
hostAddress = MultiAddress.init(DefaultAddr)
|
||||||
|
|
||||||
# Difference between announced and host address relevant for running behind NAT, however doesn't seem like nim-libp2p supports this. GHI?
|
# Difference between announced and host address relevant for running behind NAT, however doesn't seem like nim-libp2p supports this. GHI?
|
||||||
#
|
# NOTE: This is a privatekey
|
||||||
# TODO: Convert config.nodekey eth.key to libp2p.crypto key. Should work with Secp256k1, just need to ensure representation etc is the same. Using random now for spike.
|
nodekey = config.nodekey
|
||||||
#nodekey = config.nodekey
|
keys = KeyPair(seckey: nodekey, pubkey: nodekey.getKey())
|
||||||
#keys = crypto.KeyPair(nodekey)
|
peerInfo = PeerInfo.init(nodekey)
|
||||||
privKey = PrivateKey.random(Secp256k1)
|
|
||||||
keys = KeyPair(seckey: privKey, pubkey: privKey.getKey())
|
|
||||||
peerInfo = PeerInfo.init(privKey)
|
|
||||||
|
|
||||||
info "Initializing networking (host address and announced same)", address
|
info "Initializing networking (host address and announced same)", address
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue