Merge pull request #6534
7bd66b01b daemon: guard against rare 'difficulty drift' bug with checkpoints and recalculation (stoffu)
This commit is contained in:
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user