From 9f1afb1fcd14e54b1bc439322dd40f151a81f248 Mon Sep 17 00:00:00 2001 From: Guilherme Lawless Date: Wed, 6 Nov 2019 11:36:00 +0000 Subject: [PATCH] [TSAN] Data race in active_difficulty.recalculate_work test (#2393) --- nano/core_test/node.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/nano/core_test/node.cpp b/nano/core_test/node.cpp index dbafe14b..5c4bb28e 100644 --- a/nano/core_test/node.cpp +++ b/nano/core_test/node.cpp @@ -3203,9 +3203,9 @@ TEST (active_difficulty, recalculate_work) nano::work_validate (*send1, &difficulty2); node1.process_active (send1); node1.active.update_active_difficulty (lock); - lock.unlock (); 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