Skip to content

Commit 52acdf0

Browse files
authored
Merge pull request #121 from blinklabs-io/fix/mithril-preview
fix: remove check skipping mithril in preview/sanchonet
2 parents 25c70ca + b69e4a8 commit 52acdf0

File tree

1 file changed

+3
-9
lines changed

1 file changed

+3
-9
lines changed

bin/run-node

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -76,15 +76,6 @@ if [[ ${CARDANO_BLOCK_PRODUCER} == true ]]; then
7676
echo CARDANO_SHELLEY_OPERATIONAL_CERTIFICATE=${CARDANO_SHELLEY_OPERATIONAL_CERTIFICATE}
7777
fi
7878

79-
case ${CARDANO_NETWORK} in
80-
preview|sanchonet)
81-
if [[ ${RESTORE_SNAPSHOT} == true ]]; then
82-
echo "Mithril not supported on ${CARDANO_NETWORK}... skipping"
83-
fi
84-
RESTORE_SNAPSHOT=false
85-
;;
86-
esac
87-
8879
echo AGGREGATOR_ENDPOINT=${AGGREGATOR_ENDPOINT}
8980
echo GENESIS_VERIFICATION_KEY=${GENESIS_VERIFICATION_KEY}
9081
echo SNAPSHOT_DIGEST=${SNAPSHOT_DIGEST}
@@ -100,6 +91,9 @@ if ! test -e ${CARDANO_DATABASE_PATH}/protocolMagicId; then
10091
cd $(dirname ${CARDANO_DATABASE_PATH})
10192
export AGGREGATOR_ENDPOINT GENESIS_VERIFICATION_KEY SNAPSHOT_DIGEST
10293
echo "Starting: /usr/local/bin/mithril-client snapshot download ${SNAPSHOT_DIGEST}"
94+
if [[ $(cd ${CARDANO_DATABASE_PATH}; pwd -P) != $(pwd -P)/db ]]; then
95+
rm -rf db/*
96+
fi
10397
mithril-client snapshot download ${SNAPSHOT_DIGEST}
10498
if [[ $(cd ${CARDANO_DATABASE_PATH}; pwd -P) != $(pwd -P)/db ]]; then
10599
mv -f db/* ${CARDANO_DATABASE_PATH}/

0 commit comments

Comments
 (0)