mirror of
https://github.com/monero-project/monero.git
synced 2025-01-28 18:56:31 +02:00
blockchain: match original code early out in rollback_blockchain_switching
This commit is contained in:
parent
a1af0feb06
commit
1208cc8fa4
@ -690,6 +690,12 @@ bool Blockchain::rollback_blockchain_switching(std::list<block>& original_chain,
|
|||||||
LOG_PRINT_L3("Blockchain::" << __func__);
|
LOG_PRINT_L3("Blockchain::" << __func__);
|
||||||
CRITICAL_REGION_LOCAL(m_blockchain_lock);
|
CRITICAL_REGION_LOCAL(m_blockchain_lock);
|
||||||
|
|
||||||
|
// fail if rollback_height passed is too high
|
||||||
|
if (rollback_height > m_db->height())
|
||||||
|
{
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
m_timestamps_and_difficulties_height = 0;
|
m_timestamps_and_difficulties_height = 0;
|
||||||
|
|
||||||
// remove blocks from blockchain until we get back to where we should be.
|
// remove blocks from blockchain until we get back to where we should be.
|
||||||
|
Loading…
Reference in New Issue
Block a user