chore: nph format files

This commit is contained in:
Prem Chaitanya Prathi 2025-04-21 14:27:56 +05:30
parent 60f99287cd
commit 6958bec2f3
2 changed files with 3 additions and 7 deletions

View File

@ -637,6 +637,7 @@ with the drawback of consuming some more bandwidth.""",
mixkey* {.desc: "ED25519 private key as 64 char hex string.", name: "mixkey".}:
Option[string]
#TODO: Temp config for simulations.Ideally need to get this info from bootstrap ENRs
#[ mixBootstrapNodes* {.
desc:

View File

@ -1,16 +1,11 @@
{.push raises: [].}
import
std/[options],
results,
libp2p/crypto/curve25519,
nimcrypto/utils as ncrutils
import std/[options], results, libp2p/crypto/curve25519, nimcrypto/utils as ncrutils
import ../common/enr
const MixKeyEnrField* = "mix-key"
func withMixKey*(builder: var EnrBuilder, mixPubKey: Curve25519Key) =
builder.addFieldPair(MixKeyEnrField, getBytes(mixPubKey))
@ -28,4 +23,4 @@ func mixKey*(record: Record): Option[seq[byte]] =
let field = recordRes.value.tryGet(MixKeyEnrField, seq[byte])
if field.isNone():
return none(seq[byte])
return field
return field