blockchain: force a hardfork recalculation at load time

Since the state isn't actually saved anywhere, as the archive
code isn't called in the new DB version.
This commit is contained in:
moneromooo-monero 2015-09-19 16:33:39 +01:00
parent a7177610b3
commit d06713199e
No known key found for this signature in database
GPG Key ID: 686F07454D6CEFC3
1 changed files with 3 additions and 0 deletions

View File

@ -355,6 +355,9 @@ bool Blockchain::init(BlockchainDB* db, const bool testnet)
}
#endif
// reinitialize hard fork versions, since they're not saved in the DB
m_hardfork.reorganize_from_chain_height (m_db, 1);
LOG_PRINT_GREEN("Blockchain initialized. last block: " << m_db->height() - 1 << ", " << epee::misc_utils::get_time_interval_string(timestamp_diff) << " time ago, current difficulty: " << get_difficulty_for_next_block(), LOG_LEVEL_0);
return true;