From c1c60f0fe754ffa3c4dbe1f27c19408fb5e2a440 Mon Sep 17 00:00:00 2001 From: gr0vity Date: Thu, 5 Dec 2024 16:53:50 +0100 Subject: [PATCH] Fix inactive_votes_cache.election_start --- nano/core_test/active_elections.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/nano/core_test/active_elections.cpp b/nano/core_test/active_elections.cpp index 5bbc51c818..93619d08dc 100644 --- a/nano/core_test/active_elections.cpp +++ b/nano/core_test/active_elections.cpp @@ -522,7 +522,8 @@ TEST (inactive_votes_cache, election_start) node.vote_processor.vote (vote0, std::make_shared (node, node)); ASSERT_TIMELY_EQ (5s, 0, node.active.size ()); ASSERT_TIMELY_EQ (5s, 5, node.ledger.cemented_count ()); - ASSERT_TRUE (nano::test::confirmed (node, { send1, send2, open1, open2 })); + // Confirmation on disk may lag behind cemented_count cache + ASSERT_TIMELY (5s, nano::test::confirmed (node, { send1, send2, open1, open2 })); // A late block arrival also checks the inactive votes cache ASSERT_TRUE (node.active.empty ());