From e4b39f780d467d6230fec5574195327893c6504a Mon Sep 17 00:00:00 2001 From: Thiago Silva Date: Fri, 3 Feb 2023 16:40:41 -0300 Subject: [PATCH] Remove useless lazy_bootstrap arg of the bootstrap_peer function --- nano/node/bootstrap/bootstrap_connections.cpp | 2 +- nano/node/network.cpp | 2 +- nano/node/network.hpp | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/nano/node/bootstrap/bootstrap_connections.cpp b/nano/node/bootstrap/bootstrap_connections.cpp index 7e1075c9a..029c1295a 100644 --- a/nano/node/bootstrap/bootstrap_connections.cpp +++ b/nano/node/bootstrap/bootstrap_connections.cpp @@ -286,7 +286,7 @@ void nano::bootstrap_connections::populate_connections (bool repeat) // Not many peers respond, need to try to make more connections than we need. for (auto i = 0u; i < delta; i++) { - auto endpoint (node.network.bootstrap_peer (true)); + auto endpoint (node.network.bootstrap_peer ()); if (endpoint != nano::tcp_endpoint (boost::asio::ip::address_v6::any (), 0) && (node.flags.allow_bootstrap_peers_duplicates || endpoints.find (endpoint) == endpoints.end ()) && !node.network.excluded_peers.check (endpoint)) { connect_client (endpoint); diff --git a/nano/node/network.cpp b/nano/node/network.cpp index e5b697d3d..8bd33efab 100644 --- a/nano/node/network.cpp +++ b/nano/node/network.cpp @@ -712,7 +712,7 @@ void nano::network::fill_keepalive_self (std::array & target_ } } -nano::tcp_endpoint nano::network::bootstrap_peer (bool lazy_bootstrap) +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)); diff --git a/nano/node/network.hpp b/nano/node/network.hpp index a51961140..7e7974fc7 100644 --- a/nano/node/network.hpp +++ b/nano/node/network.hpp @@ -160,7 +160,7 @@ public: // Note: The minimum protocol version is used after the random selection, so number of peers can be less than expected. std::unordered_set> random_set (std::size_t, uint8_t = 0, bool = false) const; // Get the next peer for attempting a tcp bootstrap connection - nano::tcp_endpoint bootstrap_peer (bool = false); + nano::tcp_endpoint bootstrap_peer (); nano::endpoint endpoint () const; void cleanup (std::chrono::steady_clock::time_point const &); void ongoing_cleanup ();