blockchain: invalidate misc caches when popping blocks

Might be a bit heavy handed, but conservative.
This commit is contained in:
moneromooo-monero 2018-05-08 22:58:53 +01:00
parent 52f6b33890
commit ce63ab09db
No known key found for this signature in database
GPG Key ID: 686F07454D6CEFC3
1 changed files with 6 additions and 0 deletions

View File

@ -584,6 +584,12 @@ block Blockchain::pop_block_from_blockchain()
} }
} }
} }
m_blocks_longhash_table.clear();
m_scan_table.clear();
m_blocks_txs_check.clear();
m_check_txin_table.clear();
update_next_cumulative_size_limit(); update_next_cumulative_size_limit();
m_tx_pool.on_blockchain_dec(m_db->height()-1, get_tail_id()); m_tx_pool.on_blockchain_dec(m_db->height()-1, get_tail_id());