[TSAN] Data race in active_difficulty.recalculate_work test (#2393)
This commit is contained in:
parent
2dff3d8abd
commit
9f1afb1fcd
1 changed files with 2 additions and 2 deletions
|
|
@ -3203,9 +3203,9 @@ TEST (active_difficulty, recalculate_work)
|
||||||
nano::work_validate (*send1, &difficulty2);
|
nano::work_validate (*send1, &difficulty2);
|
||||||
node1.process_active (send1);
|
node1.process_active (send1);
|
||||||
node1.active.update_active_difficulty (lock);
|
node1.active.update_active_difficulty (lock);
|
||||||
lock.unlock ();
|
|
||||||
sum = std::accumulate (node1.active.multipliers_cb.begin (), node1.active.multipliers_cb.end (), double(0));
|
sum = std::accumulate (node1.active.multipliers_cb.begin (), node1.active.multipliers_cb.end (), double(0));
|
||||||
ASSERT_EQ (node1.active.active_difficulty (), nano::difficulty::from_multiplier (sum / node1.active.multipliers_cb.size (), node1.network_params.network.publish_threshold));
|
ASSERT_EQ (node1.active.trended_active_difficulty, nano::difficulty::from_multiplier (sum / node1.active.multipliers_cb.size (), node1.network_params.network.publish_threshold));
|
||||||
|
lock.unlock ();
|
||||||
}
|
}
|
||||||
|
|
||||||
namespace
|
namespace
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue