mirror of
https://github.com/monero-project/monero.git
synced 2024-11-18 00:37:43 +00:00
blockchain: fix reorganizations past a hard fork boundary
After popping blocks from the old chain, the hard fork object's notion of the current version was not in line with the new height, causing the first blocks from the new chain to be rejected due to a false expection of a newer version.
This commit is contained in:
parent
1a286061ff
commit
dd144b14bc
1 changed files with 3 additions and 0 deletions
|
@ -759,6 +759,9 @@ bool Blockchain::rollback_blockchain_switching(std::list<block>& original_chain,
|
|||
pop_block_from_blockchain();
|
||||
}
|
||||
|
||||
// make sure the hard fork object updates its current version
|
||||
m_hardfork->reorganize_from_chain_height(rollback_height);
|
||||
|
||||
//return back original chain
|
||||
for (auto& bl : original_chain)
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue