Add flag to track if bitcoin has ever fully synced
This commit is contained in:
parent
8467de49b8
commit
a1647236c9
|
@ -34,6 +34,7 @@ if [ -f $IS_TESTNET_ENABLED_FILE ]; then
|
|||
fi
|
||||
|
||||
BITCOIN_SYNCED_FILE="/mnt/hdd/mynode/.mynode_bitcoin_synced"
|
||||
BITCOIN_SYNCED_AT_LEAST_ONCE="/mnt/hdd/mynode/.mynode_bitcoin_synced_at_least_once"
|
||||
QUICKSYNC_COMPLETE_FILE="$QUICKSYNC_DIR/.quicksync_complete"
|
||||
|
||||
IS_PREMIUM=0
|
||||
|
|
|
@ -136,9 +136,8 @@
|
|||
}
|
||||
openConfirmDialog("confirm-dialog",
|
||||
"Reset Bitcoin Blockchain",
|
||||
"Resetting the blockchain will restart bitcoin from scratch or from QuickSync, " +
|
||||
"depending on your settings. This may take a long time. "+
|
||||
"Would you still like to reset the bitcoin blockchain?",
|
||||
"Resetting the blockchain will restart bitcoin from scratch. This may take a long " +
|
||||
"time. Would you still like to reset the bitcoin blockchain?",
|
||||
okFunction)
|
||||
});
|
||||
|
||||
|
|
|
@ -102,10 +102,12 @@ def update_bitcoin_main_info_thread():
|
|||
bitcoin_block_height = get_bitcoin_block_height()
|
||||
mynode_block_height = get_mynode_block_height()
|
||||
remaining = bitcoin_block_height - mynode_block_height
|
||||
if remaining == 0 and bitcoin_block_height > 710000:
|
||||
if remaining == 0 and bitcoin_block_height > 820000:
|
||||
synced = True
|
||||
if not os.path.isfile(BITCOIN_SYNCED_FILE):
|
||||
open(BITCOIN_SYNCED_FILE, 'a').close() # touch file
|
||||
if not os.path.isfile(BITCOIN_SYNCED_AT_LEAST_ONCE):
|
||||
open(BITCOIN_SYNCED_AT_LEAST_ONCE, 'a').close() # touch file
|
||||
elif remaining > 18:
|
||||
synced = False
|
||||
if os.path.isfile(BITCOIN_SYNCED_FILE):
|
||||
|
|
Loading…
Reference in New Issue
Block a user