Improved logging related to bootstrap nodes

This commit is contained in:
Zahary Karadjov 2020-01-15 23:21:03 +02:00 committed by zah
parent 589a3f06df
commit c65575d105
2 changed files with 3 additions and 6 deletions

View File

@ -132,10 +132,8 @@ proc loadBootstrapFile(bootstrapFile: string): seq[BootstrapAddr] =
result.addBootstrapAddr(line) result.addBootstrapAddr(line)
proc addEnrBootstrapNode(node: BeaconNode, enrBase64: string) = proc addEnrBootstrapNode(node: BeaconNode, enrBase64: string) =
info "Adding bootsrap node", enr = enrBase64
var enrRec: enr.Record var enrRec: enr.Record
if enrRec.fromBase64(enrBase64): if enrRec.fromURI(enrBase64):
info "Parsed ENR record", value = enrRec
try: try:
let let
ip = IpAddress(family: IpAddressFamily.IPv4, ip = IpAddress(family: IpAddressFamily.IPv4,
@ -146,6 +144,8 @@ proc addEnrBootstrapNode(node: BeaconNode, enrBase64: string) =
node.bootstrapEnrs.add enrRec node.bootstrapEnrs.add enrRec
except CatchableError as err: except CatchableError as err:
warn "Invalid ENR record", enrRec warn "Invalid ENR record", enrRec
else:
warn "Failed to parse ENR record", value = enrRec
proc useEnrBootstrapFile(node: BeaconNode, bootstrapFile: string) = proc useEnrBootstrapFile(node: BeaconNode, bootstrapFile: string) =
let ext = splitFile(bootstrapFile).ext let ext = splitFile(bootstrapFile).ext

View File

@ -35,9 +35,6 @@ cli do (testnetName {.argument.}: string):
rmDir(allTestnetsDir) rmDir(allTestnetsDir)
cd buildDir cd buildDir
# TODO
# The branch below is temporarily changed until the following issue is addressed:
# https://github.com/eth2-clients/eth2-testnets/pull/3
exec &"git clone --quiet --depth=1 {testnetsGitUrl}" exec &"git clone --quiet --depth=1 {testnetsGitUrl}"
var var