From 7c7a5ea90cd43a68e497c73d12e34d54c48ef269 Mon Sep 17 00:00:00 2001 From: Chris Sosnin Date: Wed, 10 Nov 2021 13:48:31 +0300 Subject: [PATCH] data-restore: allow running in non-finite mode in docker --- docker/data-restore/data-restore-entry.sh | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/docker/data-restore/data-restore-entry.sh b/docker/data-restore/data-restore-entry.sh index 25cf997a33..11d8d05ed3 100755 --- a/docker/data-restore/data-restore-entry.sh +++ b/docker/data-restore/data-restore-entry.sh @@ -43,6 +43,20 @@ case $NETWORK in ;; esac +# Default to executing data restore in a finite mode. +MODE="--finite" +case $FINITE_MODE in + "true" | "") + ;; + "false") + MODE="" + ;; + *) + echo "Invalid value of FINITE_MODE: expected boolean" + exit 1 + ;; +esac + if [[ -n $PG_DUMP && "$COMMAND" == "--continue" ]] then # Do not drop db if the file doesn't exist. @@ -56,4 +70,4 @@ fi CONFIG_FILE="/usr/src/configs/${NETWORK}.json" -zk f ./target/release/zksync_data_restore $COMMAND --finite --config $CONFIG_FILE --web3 $WEB3_URL || exit 1 +zk f ./target/release/zksync_data_restore $COMMAND $MODE --config $CONFIG_FILE --web3 $WEB3_URL || exit 1