Skip to content

Commit 4683cb0

Browse files
authored
fix(run-node): devnet start sed for byron genesis and create data dir (#228)
Signed-off-by: Chris Gianelloni <wolf31o2@blinklabs.io>
1 parent da11220 commit 4683cb0

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

bin/run-node

+3-1
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ case ${CARDANO_NETWORK} in
6060
# empty topology
6161
echo '{"Producers": []}' > ${CARDANO_TOPOLOGY}
6262
# network start times
63-
sed -i "s/\"startTime\": [0-9]*/\"startTime\" $(date +%s)/" \
63+
sed -i "s/\"startTime\": [0-9]*/\"startTime\": $(date +%s)/" \
6464
${CARDANO_CONFIG_BASE}/${CARDANO_NETWORK}/byron-genesis.json
6565
sed -i "s/\"systemStart\": \".*\"/\"systemStart\": \"$(date -u +%FT%TZ)\"/" \
6666
${CARDANO_CONFIG_BASE}/${CARDANO_NETWORK}/shelley-genesis.json
@@ -138,6 +138,8 @@ if ! test -e ${CARDANO_DATABASE_PATH}/protocolMagicId; then
138138
if [[ $(cd ${CARDANO_DATABASE_PATH}; pwd -P) != $(pwd -P)/db ]]; then
139139
mv -f db/* ${CARDANO_DATABASE_PATH}/
140140
fi
141+
else
142+
mkdir -p ${CARDANO_DATABASE_PATH}
141143
fi
142144
elif [[ ${RESTORE_SNAPSHOT} == true ]]; then
143145
echo "Detected populated ${CARDANO_DATABASE_PATH}... skipping restore"

0 commit comments

Comments
 (0)