diff options
| author | Alexander Blair <snipa@jagtech.io> | 2020-07-19 03:36:39 -0700 |
|---|---|---|
| committer | Alexander Blair <snipa@jagtech.io> | 2020-07-19 03:36:39 -0700 |
| commit | 36d50d93f295d4b193e73f3ff3e95ae7e050c767 (patch) | |
| tree | c8c7b69c5b0f769fdf1f72460462851597506d88 /src/cryptonote_core/cryptonote_core.cpp | |
| parent | 912cbad6dbf6afbe3e837a0be5cc2111df5b8bd4 (diff) | |
| parent | 7bd66b01bfb62ecaf8ff02b20d14db3a77322abc (diff) | |
| download | monzero-core-36d50d93f295d4b193e73f3ff3e95ae7e050c767.tar.gz monzero-core-36d50d93f295d4b193e73f3ff3e95ae7e050c767.tar.xz monzero-core-36d50d93f295d4b193e73f3ff3e95ae7e050c767.zip | |
Merge pull request #6534
7bd66b01b daemon: guard against rare 'difficulty drift' bug with checkpoints and recalculation (stoffu)
Diffstat (limited to 'src/cryptonote_core/cryptonote_core.cpp')
| -rw-r--r-- | src/cryptonote_core/cryptonote_core.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/cryptonote_core/cryptonote_core.cpp b/src/cryptonote_core/cryptonote_core.cpp index c19d8c524..141e54459 100644 --- a/src/cryptonote_core/cryptonote_core.cpp +++ b/src/cryptonote_core/cryptonote_core.cpp @@ -1661,6 +1661,7 @@ namespace cryptonote m_check_disk_space_interval.do_call(boost::bind(&core::check_disk_space, this)); m_block_rate_interval.do_call(boost::bind(&core::check_block_rate, this)); m_blockchain_pruning_interval.do_call(boost::bind(&core::update_blockchain_pruning, this)); + m_diff_recalc_interval.do_call(boost::bind(&core::recalculate_difficulties, this)); m_miner.on_idle(); m_mempool.on_idle(); return true; @@ -1899,6 +1900,12 @@ namespace cryptonote return true; } //----------------------------------------------------------------------------------------------- + bool core::recalculate_difficulties() + { + m_blockchain_storage.recalculate_difficulties(); + return true; + } + //----------------------------------------------------------------------------------------------- void core::flush_bad_txs_cache() { bad_semantics_txes_lock.lock(); |
