Remove useless lazy_bootstrap arg of the bootstrap_peer function

This commit is contained in:
Thiago Silva 2023-02-03 16:40:41 -03:00 committed by clemahieu
commit e4b39f780d
3 changed files with 3 additions and 3 deletions

View file

@ -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. // Not many peers respond, need to try to make more connections than we need.
for (auto i = 0u; i < delta; i++) 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)) 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); connect_client (endpoint);

View file

@ -712,7 +712,7 @@ void nano::network::fill_keepalive_self (std::array<nano::endpoint, 8> & 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); nano::tcp_endpoint result (boost::asio::ip::address_v6::any (), 0);
bool use_udp_peer (nano::random_pool::generate_word32 (0, 1)); bool use_udp_peer (nano::random_pool::generate_word32 (0, 1));

View file

@ -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. // Note: The minimum protocol version is used after the random selection, so number of peers can be less than expected.
std::unordered_set<std::shared_ptr<nano::transport::channel>> random_set (std::size_t, uint8_t = 0, bool = false) const; std::unordered_set<std::shared_ptr<nano::transport::channel>> random_set (std::size_t, uint8_t = 0, bool = false) const;
// Get the next peer for attempting a tcp bootstrap connection // 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; nano::endpoint endpoint () const;
void cleanup (std::chrono::steady_clock::time_point const &); void cleanup (std::chrono::steady_clock::time_point const &);
void ongoing_cleanup (); void ongoing_cleanup ();