robust snapshot download

This commit is contained in:
czarly
2022-03-25 04:16:49 +04:00
parent 297d2be210
commit b24601f47a

View File

@@ -31,7 +31,7 @@ if [ "${BOOTSTRAP}" == 1 ] && [ -n "${SNAPSHOT_URL}" ] && [ ! -f "${BOR_HOME}/bo
then
echo "downloading snapshot from ${SNAPSHOT_URL}"
mkdir -p ${BOR_HOME}/bor/chaindata
wget -c "${SNAPSHOT_URL}" -O - | tar -xz -C ${BOR_HOME}/bor/chaindata && touch ${BOR_HOME}/bootstrapped
wget --retry-connrefused --tries=0 --wait=10 --waitretry=5 -O - "${SNAPSHOT_URL}" | tar -xz -C ${BOR_HOME}/bor/chaindata && touch ${BOR_HOME}/bootstrapped
fi
READY=$(curl -s http://heimdalld:26657/status | jq '.result.sync_info.catching_up')