blockchain: reset hardfork object when resetting blockchain

Not doing so will prevent the new genesis block from being
reset if a switch past v1 had occured already.
This commit is contained in:
moneromooo-monero 2016-02-08 18:21:42 +00:00
parent 24ccdb9b6e
commit 6c8e5c3459
No known key found for this signature in database
GPG key ID: 686F07454D6CEFC3

View file

@ -494,6 +494,7 @@ bool Blockchain::reset_and_set_genesis_block(const block& b)
CRITICAL_REGION_LOCAL(m_blockchain_lock); CRITICAL_REGION_LOCAL(m_blockchain_lock);
m_alternative_chains.clear(); m_alternative_chains.clear();
m_db->reset(); m_db->reset();
m_hardfork->init();
block_verification_context bvc = boost::value_initialized<block_verification_context>(); block_verification_context bvc = boost::value_initialized<block_verification_context>();
add_new_block(b, bvc); add_new_block(b, bvc);