@ -80,6 +80,13 @@ if [ "${state}" = "presync" ]; then
echo""
# analyse if blockchain was detected broken by pre-sync
blockchainBroken=$(sudo tail /mnt/hdd/bitcoin/debug.log | grep -c "Please restart with -reindex or -reindex-chainstate to recover.")
# dismiss if its just a date thing
futureBlock=$(sudo tail /mnt/hdd/bitcoin/debug.log | grep "Please restart with -reindex or -reindex-chainstate to recover."| grep -c "block database contains a block which appears to be from the future")
if[${futureBlock} -gt 0];then
blockchainBroken=0
echo"-> Ignore reindex - its just a future block, but delete logs to avoid future mismatches"
reindex=$(sudo cat /mnt/hdd/${network}/debug.log | grep -c 'Please restart with -reindex or -reindex-chainstate to recover')
# dismiss if its just a date thing
futureBlock=$(sudo tail /mnt/hdd/${network}/debug.log | grep "Please restart with -reindex or -reindex-chainstate to recover"| grep -c "block database contains a block which appears to be from the future")
if[${futureBlock} -gt 0];then
blockchainBroken=0
echo"-> Ignore reindex - its just a future block, but delete logs to avoid future mismatches"