From e286a647816cf3a3213cdc3aaf7f51200abe2d4a Mon Sep 17 00:00:00 2001 From: dsiganos Date: Tue, 15 Jun 2021 09:52:58 +0100 Subject: [PATCH] Fix for active_transactions.pessimistic_elections unit test (#3328) This assert was sometimes failing: ASSERT_TIMELY (10s, node.active.active (send->qualified_root ())); We think the original intention was to check "send2" and not "send". send2 should become active for an election after its parent gets confirmed. --- nano/core_test/active_transactions.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nano/core_test/active_transactions.cpp b/nano/core_test/active_transactions.cpp index 5898a09b0..1d54565a4 100644 --- a/nano/core_test/active_transactions.cpp +++ b/nano/core_test/active_transactions.cpp @@ -1261,7 +1261,7 @@ TEST (active_transactions, pessimistic_elections) } // Activation of cemented frontier successor should get started after the first pessimistic block is confirmed - ASSERT_TIMELY (10s, node.active.active (send->qualified_root ())); + ASSERT_TIMELY (10s, node.active.active (send2->qualified_root ())); node.active.confirm_expired_frontiers_pessimistically (node.store.tx_begin_read (), 100, election_count); ASSERT_EQ (1, election_count);