#1699 fix getting stuck on recovering specter

This commit is contained in:
geco91
2020-10-28 22:22:54 +01:00
committed by rootzoll
parent 33500007fa
commit 616fcf4a9f

View File

@@ -265,14 +265,20 @@ EOF
# blockfilterindex on # blockfilterindex on
# check txindex (parsed and sourced from bitcoin network config above) # check txindex (parsed and sourced from bitcoin network config above)
if [ ${blockfilterindex} == 0 ]; then if [ "${blockfilterindex}" = "0" ]; then
sudo sed -i "s/^blockfilterindex=.*/blockfilterindex=1/g" /mnt/hdd/${network}/${network}.conf sudo sed -i "s/^blockfilterindex=.*/blockfilterindex=1/g" /mnt/hdd/${network}/${network}.conf
echo "switching blockfilterindex=1 and restarting ${network}d" echo "# switching blockfilterindex=1"
sudo systemctl restart ${network}d isBitcoinRunning=$(sudo systemctl is-active ${network}d | grep -c "^active")
echo "The indexing takes ~10h on an RPi4 with SSD" if [ ${isBitcoinRunning} -eq 1 ]; then
echo "check with: sudo cat /mnt/hdd/bitcoin/debug.log | grep filter" echo "# ${network}d is running - so restarting"
sudo systemctl restart ${network}d
else
echo "# ${network}d is not running - so NOT restarting"
fi
echo "# The indexing takes ~10h on an RPi4 with SSD"
echo "# check with: sudo cat /mnt/hdd/bitcoin/debug.log | grep filter"
else else
echo "blockfilterindex is already active" echo "# blockfilterindex is already active"
fi fi
exit 0 exit 0