Skip to content

Commit

Permalink
Removing the udp_channels from the node's network (part 3)
Browse files Browse the repository at this point in the history
  • Loading branch information
Thiago Silva authored and thsfs committed Feb 15, 2023
1 parent f6b676e commit 96a82da
Showing 1 changed file with 1 addition and 11 deletions.
12 changes: 1 addition & 11 deletions nano/node/network.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -655,17 +655,7 @@ void nano::network::fill_keepalive_self (std::array<nano::endpoint, 8> & target_

nano::tcp_endpoint nano::network::bootstrap_peer ()
{
nano::tcp_endpoint result (boost::asio::ip::address_v6::any (), 0);
bool use_udp_peer (nano::random_pool::generate_word32 (0, 1));
if (use_udp_peer || tcp_channels.size () == 0)
{
result = udp_channels.bootstrap_peer (node.network_params.network.protocol_version_min);
}
if (result == nano::tcp_endpoint (boost::asio::ip::address_v6::any (), 0))
{
result = tcp_channels.bootstrap_peer (node.network_params.network.protocol_version_min);
}
return result;
return tcp_channels.bootstrap_peer (node.network_params.network.protocol_version_min);
}

std::shared_ptr<nano::transport::channel> nano::network::find_channel (nano::endpoint const & endpoint_a)
Expand Down

0 comments on commit 96a82da

Please sign in to comment.