Fix unit test node.local_votes_cache (#3929)

The code to convert UDP to TCP introduced a extra node in the network that
interferes with the test case.
This commit is contained in:
Dimitrios Siganos 2022-08-30 20:00:04 +01:00 committed by GitHub
commit 91ef65fc2a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -2288,8 +2288,7 @@ TEST (node, local_votes_cache)
system.wallet (0)->insert_adhoc (nano::dev::genesis_key.prv);
nano::confirm_req message1{ nano::dev::network_params.network, send1 };
nano::confirm_req message2{ nano::dev::network_params.network, send2 };
auto other_node = nano::test::add_outer_node (system, nano::test::get_available_port ());
auto channel = nano::test::establish_tcp (system, *other_node, node.network.endpoint ());
auto channel = std::make_shared<nano::transport::inproc::channel> (node, node);
node.network.inbound (message1, channel);
ASSERT_TIMELY (3s, node.stats.count (nano::stat::type::requests, nano::stat::detail::requests_generated_votes) == 1);
node.network.inbound (message2, channel);