When the node is constructed outside of a nano::system, if the test fails, the node will not be shut down and can result in other tests failing further on.

This commit is contained in:
clemahieu 2022-07-12 05:44:14 +01:00
commit 15b3945511
No known key found for this signature in database
GPG key ID: 43708520C8DFB938

View file

@ -1434,13 +1434,13 @@ TEST (bootstrap_processor, wallet_lazy_pending)
.work (*node0->work_generate_blocking (receive1->hash ()))
.build_shared ();
// Processing test chain
// Processing test c`hain
node0->block_processor.add (send1);
node0->block_processor.add (receive1);
node0->block_processor.add (send2);
node0->block_processor.flush ();
// Start wallet lazy bootstrap
auto node1 (std::make_shared<nano::node> (system.io_ctx, nano::get_available_port (), nano::unique_path (), system.logging, system.work));
auto node1 = system.add_node ();
node1->network.udp_channels.insert (node0->network.endpoint (), node1->network_params.network.protocol_version);
auto wallet (node1->wallets.create (nano::random_wallet_id ()));
ASSERT_NE (nullptr, wallet);
@ -1448,7 +1448,6 @@ TEST (bootstrap_processor, wallet_lazy_pending)
node1->bootstrap_wallet ();
// Check processed blocks
ASSERT_TIMELY (10s, node1->ledger.block_or_pruned_exists (send2->hash ()));
node1->stop ();
}
TEST (bootstrap_processor, multiple_attempts)