Don't log unwanted lines in beacon_node --help

This commit is contained in:
Zahary Karadjov 2020-02-18 02:32:12 +02:00 committed by zah
parent b2d5aba749
commit 57811dce89
2 changed files with 6 additions and 8 deletions

View File

@ -1044,6 +1044,10 @@ when hasPrompt:
# createThread(t, processPromptCommands, addr p)
when isMainModule:
let config = BeaconNodeConf.load(
version = clientId,
copyrightBanner = clientId & "\p" & copyrights)
when compiles(defaultChroniclesStream.output.writer):
defaultChroniclesStream.output.writer =
proc (logLevel: LogLevel, msg: LogOutputStr) {.gcsafe.} =
@ -1051,16 +1055,10 @@ when isMainModule:
debug "Launching beacon node",
version = fullVersionStr,
cmdParams = commandLineParams()
cmdParams = commandLineParams(), config
randomize()
let config = BeaconNodeConf.load(
version = clientId,
copyrightBanner = clientId & "\p" & copyrights)
debug "Configuration loaded", config
if config.logLevel != LogLevel.NONE:
setLogLevel(config.logLevel)

View File

@ -232,7 +232,7 @@ when networkBackend in [libp2p, libp2pDaemon]:
await node.start()
await sleepAsync(10.seconds)
if libp2p_successful_dials.value == 0:
if bootstrapEnrs.len > 0 and libp2p_successful_dials.value == 0:
fatal "Failed to connect to any bootstrap node. Quitting"
quit 1