robust snapshot download

This commit is contained in:
czarly
2022-03-25 04:22:14 +04:00
parent 115c4fd30f
commit cc02077bf4

View File

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