Always notify on active difficulty updates (#2109)

This commit is contained in:
cryptocode 2019-06-27 18:15:59 +02:00 committed by Zach Hyatt
commit 6689fc98c1

View file

@ -638,12 +638,8 @@ void nano::active_transactions::update_active_difficulty (std::unique_lock<std::
auto difficulty = nano::difficulty::from_multiplier (sum / multipliers_cb.size (), node.network_params.network.publish_threshold);
assert (difficulty >= node.network_params.network.publish_threshold);
bool notify_change = trended_active_difficulty != difficulty;
trended_active_difficulty = difficulty;
if (notify_change)
{
node.observers.difficulty.notify (trended_active_difficulty);
}
node.observers.difficulty.notify (trended_active_difficulty);
}
uint64_t nano::active_transactions::active_difficulty ()