create dumpdir in beaconnode binary
This commit is contained in:
parent
3fa2f70853
commit
30f84224a4
|
@ -1057,6 +1057,10 @@ programMain:
|
||||||
|
|
||||||
createPidFile(config.dataDir.string / "beacon_node.pid")
|
createPidFile(config.dataDir.string / "beacon_node.pid")
|
||||||
|
|
||||||
|
if config.dumpEnabled:
|
||||||
|
createDir(config.dumpDir)
|
||||||
|
createDir(config.dumpDir / "incoming")
|
||||||
|
|
||||||
var node = waitFor BeaconNode.init(config)
|
var node = waitFor BeaconNode.init(config)
|
||||||
|
|
||||||
## Ctrl+C handling
|
## Ctrl+C handling
|
||||||
|
|
|
@ -87,7 +87,6 @@ cli do (skipGoerliKey {.
|
||||||
.replace(")", "_")
|
.replace(")", "_")
|
||||||
dataDir = buildDir / "data" / dataDirName
|
dataDir = buildDir / "data" / dataDirName
|
||||||
validatorsDir = dataDir / "validators"
|
validatorsDir = dataDir / "validators"
|
||||||
dumpDir = dataDir / "dump"
|
|
||||||
beaconNodeBinary = buildDir / "beacon_node_" & dataDirName
|
beaconNodeBinary = buildDir / "beacon_node_" & dataDirName
|
||||||
var
|
var
|
||||||
nimFlags = "-d:chronicles_log_level=TRACE " & getEnv("NIM_PARAMS")
|
nimFlags = "-d:chronicles_log_level=TRACE " & getEnv("NIM_PARAMS")
|
||||||
|
@ -115,9 +114,6 @@ cli do (skipGoerliKey {.
|
||||||
cd rootDir
|
cd rootDir
|
||||||
exec &"""nim c {nimFlags} -d:"const_preset={preset}" -o:"{beaconNodeBinary}" beacon_chain/beacon_node.nim"""
|
exec &"""nim c {nimFlags} -d:"const_preset={preset}" -o:"{beaconNodeBinary}" beacon_chain/beacon_node.nim"""
|
||||||
|
|
||||||
mkDir dumpDir
|
|
||||||
mkDir dumpDir / "incoming"
|
|
||||||
|
|
||||||
proc execIgnoringExitCode(s: string) =
|
proc execIgnoringExitCode(s: string) =
|
||||||
# reduces the error output when interrupting an external command with Ctrl+C
|
# reduces the error output when interrupting an external command with Ctrl+C
|
||||||
try:
|
try:
|
||||||
|
|
Loading…
Reference in New Issue