diff options
author | moneromooo-monero <moneromooo-monero@users.noreply.github.com> | 2015-09-19 16:33:39 +0100 |
---|---|---|
committer | moneromooo-monero <moneromooo-monero@users.noreply.github.com> | 2015-09-19 16:47:42 +0100 |
commit | d06713199eda083290d3778786198a02250d97b9 (patch) | |
tree | 5cc80ed911b44f941e6b7f8f06f955f9f782d2c9 /src/cryptonote_core | |
parent | core: add consts where appropriate (diff) | |
download | monero-d06713199eda083290d3778786198a02250d97b9.tar.xz |
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.
Diffstat (limited to 'src/cryptonote_core')
-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 7673aa1f1..868006e62 100644 --- a/src/cryptonote_core/blockchain.cpp +++ b/src/cryptonote_core/blockchain.cpp @@ -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; |