From 48a0cbb7638a39ee3d9fca588aa26d6bace07c87 Mon Sep 17 00:00:00 2001 From: gr0vity Date: Fri, 2 Feb 2024 14:18:17 +0100 Subject: [PATCH] Wait send confirmation before creating receive block --- nano/core_test/election_scheduler.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/nano/core_test/election_scheduler.cpp b/nano/core_test/election_scheduler.cpp index 2e17c27d50..3996c36c62 100644 --- a/nano/core_test/election_scheduler.cpp +++ b/nano/core_test/election_scheduler.cpp @@ -89,6 +89,8 @@ TEST (election_scheduler, no_vacancy) .build_shared (); ASSERT_EQ (nano::process_result::progress, node.process (*send).code); node.process_confirmed (nano::election_status{ send }); + // Receive block should not be activated by `activate_successors` as this will start an undesired election + std::this_thread::sleep_for (100ms); auto receive = builder.make_block () .account (key.pub)