mirror of
https://codeberg.org/anoncontributorxmr/monero.git
synced 2024-11-23 19:33:28 +01:00
blockchain: fix switch to alternative blockchain for more than one block
When rolling over more than one block, the db height will decrease, but the split height should be constant, as per the original code.
This commit is contained in:
parent
5cec076e13
commit
d837c0ca90
@ -797,7 +797,7 @@ bool Blockchain::switch_to_alternative_blockchain(std::list<blocks_ext_by_hash::
|
|||||||
// rollback_blockchain_switching should be moved to two different
|
// rollback_blockchain_switching should be moved to two different
|
||||||
// functions: rollback and apply_chain, but for now we pretend it is
|
// functions: rollback and apply_chain, but for now we pretend it is
|
||||||
// just the latter (because the rollback was done above).
|
// just the latter (because the rollback was done above).
|
||||||
rollback_blockchain_switching(disconnected_chain, m_db->height());
|
rollback_blockchain_switching(disconnected_chain, split_height);
|
||||||
|
|
||||||
// FIXME: Why do we keep invalid blocks around? Possibly in case we hear
|
// FIXME: Why do we keep invalid blocks around? Possibly in case we hear
|
||||||
// about them again so we can immediately dismiss them, but needs some
|
// about them again so we can immediately dismiss them, but needs some
|
||||||
|
Loading…
Reference in New Issue
Block a user