From 0b2dcf1ab118cd6e2d5e9b2f73cda4166c70f3ed Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Piotr=20W=C3=B3jcik?= <3044353+pwojcikdev@users.noreply.github.com> Date: Tue, 2 Jul 2024 16:03:31 +0200 Subject: [PATCH] Fix `node.block_confirm` test (#4666) --- nano/core_test/node.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/nano/core_test/node.cpp b/nano/core_test/node.cpp index f40dd6ccc0..d51a037431 100644 --- a/nano/core_test/node.cpp +++ b/nano/core_test/node.cpp @@ -1765,7 +1765,6 @@ TEST (node, block_confirm) auto & node2 (*system.nodes[1]); nano::keypair key; nano::state_block_builder builder; - system.wallet (1)->insert_adhoc (nano::dev::genesis_key.prv); auto send1 = builder.make_block () .account (nano::dev::genesis_key.pub) .previous (nano::dev::genesis->hash ()) @@ -1790,6 +1789,8 @@ TEST (node, block_confirm) node2.start_election (send1_copy); std::shared_ptr election; ASSERT_TIMELY (5s, election = node2.active.election (send1_copy->qualified_root ())); + // Make node2 genesis representative so it can vote + system.wallet (1)->insert_adhoc (nano::dev::genesis_key.prv); ASSERT_TIMELY_EQ (10s, node1.active.recently_cemented.list ().size (), 1); }