From 30f84224a4473262f95b8a9f3466167768020b84 Mon Sep 17 00:00:00 2001 From: Jacek Sieka Date: Wed, 20 May 2020 10:58:48 +0200 Subject: [PATCH] create dumpdir in beaconnode binary --- beacon_chain/beacon_node.nim | 4 ++++ scripts/connect_to_testnet.nims | 4 ---- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/beacon_chain/beacon_node.nim b/beacon_chain/beacon_node.nim index f32b33e92..a5ae7e3a0 100644 --- a/beacon_chain/beacon_node.nim +++ b/beacon_chain/beacon_node.nim @@ -1057,6 +1057,10 @@ programMain: createPidFile(config.dataDir.string / "beacon_node.pid") + if config.dumpEnabled: + createDir(config.dumpDir) + createDir(config.dumpDir / "incoming") + var node = waitFor BeaconNode.init(config) ## Ctrl+C handling diff --git a/scripts/connect_to_testnet.nims b/scripts/connect_to_testnet.nims index f621c5460..97467b154 100644 --- a/scripts/connect_to_testnet.nims +++ b/scripts/connect_to_testnet.nims @@ -87,7 +87,6 @@ cli do (skipGoerliKey {. .replace(")", "_") dataDir = buildDir / "data" / dataDirName validatorsDir = dataDir / "validators" - dumpDir = dataDir / "dump" beaconNodeBinary = buildDir / "beacon_node_" & dataDirName var nimFlags = "-d:chronicles_log_level=TRACE " & getEnv("NIM_PARAMS") @@ -115,9 +114,6 @@ cli do (skipGoerliKey {. cd rootDir exec &"""nim c {nimFlags} -d:"const_preset={preset}" -o:"{beaconNodeBinary}" beacon_chain/beacon_node.nim""" - mkDir dumpDir - mkDir dumpDir / "incoming" - proc execIgnoringExitCode(s: string) = # reduces the error output when interrupting an external command with Ctrl+C try: