mirror of
https://github.com/raspiblitz/raspiblitz.git
synced 2025-08-08 09:12:43 +02:00
fix false start
This commit is contained in:
@@ -168,10 +168,10 @@ waitUntilChainNetworkIsReady()
|
|||||||
if [ "${network}" = "litecoin" ]; then
|
if [ "${network}" = "litecoin" ]; then
|
||||||
minSize=20000000000
|
minSize=20000000000
|
||||||
fi
|
fi
|
||||||
|
isSyncing=$(sudo ls -la /mnt/hdd/${network}/blocks/.selfsync | grep -c '.selfsync')
|
||||||
blockchainsize=$(sudo du -shbc /mnt/hdd/${network} 2>/dev/null | head -n1 | awk '{print $1;}')
|
blockchainsize=$(sudo du -shbc /mnt/hdd/${network} 2>/dev/null | head -n1 | awk '{print $1;}')
|
||||||
if [ ${#blockchainsize} -gt 0 ]; then
|
if [ ${#blockchainsize} -gt 0 ]; then
|
||||||
if [ ${blockchainsize} -lt ${minSize} ]; then
|
if [ ${blockchainsize} -lt ${minSize} ]; then
|
||||||
isSyncing=$(sudo ls -la /mnt/hdd/${network}/blocks/.selfsync | grep -c '.selfsync')
|
|
||||||
if [ ${isSyncing} -eq 0 ]; then
|
if [ ${isSyncing} -eq 0 ]; then
|
||||||
echo "blockchainsize(${blockchainsize})"
|
echo "blockchainsize(${blockchainsize})"
|
||||||
echo "Missing Blockchain Data (<${minSize}) ..."
|
echo "Missing Blockchain Data (<${minSize}) ..."
|
||||||
@@ -193,6 +193,9 @@ waitUntilChainNetworkIsReady()
|
|||||||
blockchainBroken=0
|
blockchainBroken=0
|
||||||
echo "-> Ignore reindex - its just a future block"
|
echo "-> Ignore reindex - its just a future block"
|
||||||
fi
|
fi
|
||||||
|
if [ ${isSyncing} -gt 0 ]; then
|
||||||
|
reindex=0
|
||||||
|
fi
|
||||||
fi
|
fi
|
||||||
if [ ${reindex} -gt 0 ] || [ "${clienterror}" = "missing blockchain" ]; then
|
if [ ${reindex} -gt 0 ] || [ "${clienterror}" = "missing blockchain" ]; then
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user