From 673eeb6a65494479d96caa56c7f166599457cad7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C8=98tefan=20Talpalaru?= Date: Wed, 17 Jun 2020 16:03:34 +0200 Subject: [PATCH] connect_to_testnet.nims changes [skip ci] - remove `--dev-build` option - unconditionally write the "nbc.log" file, but do it after a chdir to dataDir because Chronicles doesn't seem to support proper paths for "file(...)" in sink definitions - change base RPC port (9090 -> 9190) because 9090 is the default Prometheus daemon listening port --- scripts/connect_to_testnet.nims | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/scripts/connect_to_testnet.nims b/scripts/connect_to_testnet.nims index a3d8d0d1f..bbb4ae712 100644 --- a/scripts/connect_to_testnet.nims +++ b/scripts/connect_to_testnet.nims @@ -30,10 +30,6 @@ cli do (skipGoerliKey {. desc: "The Ethereum 2.0 const preset of the network (optional)" name: "const-preset" .} = "", - devBuild {. - desc: "Enables more extensive logging and debugging support" - name: "dev-build" .} = false, - nodeID {. desc: "Node ID" .} = 0.int, @@ -44,7 +40,7 @@ cli do (skipGoerliKey {. desc: "Base metrics port (nodeID will be added to it)" .} = 8008.int, baseRpcPort {. - desc: "Base rpc port (nodeID will be added to it)" .} = 9090.int, + desc: "Base rpc port (nodeID will be added to it)" .} = 9190.int, testnetName {.argument .}: string): let @@ -104,8 +100,8 @@ cli do (skipGoerliKey {. var nimFlags = "-d:chronicles_log_level=TRACE " & getEnv("NIM_PARAMS") - if devBuild: - nimFlags.add """ -d:"chronicles_sinks=textlines,json[file(nbc.log)]" """ + # write the logs to a file + nimFlags.add """ -d:"chronicles_sinks=textlines,json[file(nbc.log,truncate)]" """ let depositContractFile = testnetDir / depositContractFileName if system.fileExists(depositContractFile): @@ -167,6 +163,7 @@ cli do (skipGoerliKey {. logLevelOpt = &"""--log-level="{logLevel}" """ mode = Verbose + cd dataDir execIgnoringExitCode replace(&"""{beaconNodeBinary} --data-dir="{dataDir}" --dump