Skip to content

Commit

Permalink
Remove useless lazy_bootstrap arg of the bootstrap_peer function
Browse files Browse the repository at this point in the history
  • Loading branch information
Thiago Silva authored and clemahieu committed Feb 6, 2023
1 parent 08ea15a commit e4b39f7
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion nano/node/bootstrap/bootstrap_connections.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
2 changes: 1 addition & 1 deletion nano/node/network.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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);
bool use_udp_peer (nano::random_pool::generate_word32 (0, 1));
Expand Down
2 changes: 1 addition & 1 deletion nano/node/network.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,7 @@ class network final
// 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;
// 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 ();
Expand Down

0 comments on commit e4b39f7

Please sign in to comment.