1.0.6 Bootstrap-rebuild from latestCache db
This commit is contained in:
parent
6ce6f75a0e
commit
43ca91258b
@ -176,7 +176,6 @@ old_latest_cache.execute("ATTACH DATABASE 'latestCache.db' AS new_db")
|
||||
old_latest_cache.execute("INSERT INTO new_db.latestBlocks SELECT * FROM latestBlocks")
|
||||
old_latest_cache.close()
|
||||
|
||||
|
||||
# delete
|
||||
# system.db , latestCache.db, smartContracts, tokens
|
||||
if os.path.isfile('./system1.db'):
|
||||
@ -186,4 +185,9 @@ if os.path.isfile('./latestCache1.db'):
|
||||
if os.path.isfile('./smartContracts1'):
|
||||
shutil.rmtree('smartContracts1')
|
||||
if os.path.isfile('./tokens1'):
|
||||
shutil.rmtree('tokens1')
|
||||
shutil.rmtree('tokens1')
|
||||
|
||||
# Update system.db's last scanned block
|
||||
connection = create_database_connection('system_dbs', {'db_name': "system"})
|
||||
connection.execute(f"UPDATE systemData SET value = {int(list(lblocks_dict.keys())[-1])} WHERE attribute = 'lastblockscanned';")
|
||||
connection.close()
|
||||
|
||||
Loading…
Reference in New Issue
Block a user