diff options
author | moneromooo-monero <moneromooo-monero@users.noreply.github.com> | 2016-12-13 02:13:23 +0000 |
---|---|---|
committer | moneromooo-monero <moneromooo-monero@users.noreply.github.com> | 2016-12-13 02:13:23 +0000 |
commit | dd144b14bcdcd7679d201e762a1165dcdea13c29 (patch) | |
tree | 2533a54f5eca3c886e3ef73031361e118f052079 | |
parent | Merge pull request #1436 (diff) | |
download | monero-dd144b14bcdcd7679d201e762a1165dcdea13c29.tar.xz |
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.
-rw-r--r-- | src/cryptonote_core/blockchain.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/cryptonote_core/blockchain.cpp b/src/cryptonote_core/blockchain.cpp index efda3f5cf..70b2ccc79 100644 --- a/src/cryptonote_core/blockchain.cpp +++ b/src/cryptonote_core/blockchain.cpp @@ -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) { |