mirror of
https://github.com/raspiblitz/raspiblitz.git
synced 2025-09-26 19:47:05 +02:00
fix sync flag
This commit is contained in:
@@ -171,7 +171,8 @@ waitUntilChainNetworkIsReady()
|
||||
blockchainsize=$(sudo du -shbc /mnt/hdd/${network} 2>/dev/null | head -n1 | awk '{print $1;}')
|
||||
if [ ${#blockchainsize} -gt 0 ]; then
|
||||
if [ ${blockchainsize} -lt ${minSize} ]; then
|
||||
if [ "${state}" != "resync" ]; then
|
||||
isSyncing=$(sudo ls -la /mnt/hdd/bitcoin/blocks/.selfsync | grep -c '.selfsync')
|
||||
if [ ${isSyncing} -eq 0 ]; then
|
||||
echo "blockchainsize(${blockchainsize})"
|
||||
echo "Missing Blockchain Data (<${minSize}) ..."
|
||||
clienterror="missing blockchain"
|
||||
|
@@ -59,10 +59,12 @@ fi
|
||||
echo "*** Activating Blockain Sync ***"
|
||||
|
||||
sudo mkdir /mnt/hdd/${network} 2>/dev/null
|
||||
sudo mkdir /mnt/hdd/${network}/blocks 2>/dev/null
|
||||
sudo mkdir /mnt/hdd/${network}/chainstate 2>/dev/null
|
||||
sudo /home/admin/XXcleanHDD.sh -blockchain -force
|
||||
|
||||
# set so that 10raspiblitz.sh has a flag to see that resync is running
|
||||
sudo sed -i "s/^state=.*/state=resync/g" /home/admin/raspiblitz.info
|
||||
sudo touch /mnt/hdd/${network}/blocks/.selfsync
|
||||
|
||||
echo "OK - sync is activated"
|
||||
|
||||
|
Reference in New Issue
Block a user