Fix vote_by_hash_bundle test (#3962)

This commit is contained in:
Piotr Wójcik 2022-09-27 23:34:24 +02:00 committed by GitHub
commit ed2be253f3
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -2579,10 +2579,11 @@ TEST (node, vote_by_hash_bundle)
blocks.push_back (block);
ASSERT_EQ (nano::process_result::progress, node.ledger.process (node.store.tx_begin_write (), *blocks.back ()).code);
}
node.block_confirm (blocks.back ());
auto election = node.active.election (blocks.back ()->qualified_root ());
ASSERT_NE (nullptr, election);
election->force_confirm ();
// Confirming last block will confirm whole chain and allow us to generate votes for those blocks later
ASSERT_TRUE (nano::test::confirm (node, { blocks.back () }));
ASSERT_TIMELY (5s, nano::test::confirmed (node, { blocks.back () }));
system.wallet (0)->insert_adhoc (nano::dev::genesis_key.prv);
nano::keypair key1;
system.wallet (0)->insert_adhoc (key1.prv);