From b07167a90dd44e5d92acadd85f041ab7976d034f Mon Sep 17 00:00:00 2001 From: Luke Alonso Date: Mon, 29 Jan 2018 06:02:53 -0800 Subject: [PATCH] Avoid bootstrapping from stuck nodes. (#553) --- rai/node/bootstrap.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/rai/node/bootstrap.cpp b/rai/node/bootstrap.cpp index 4efd3b03..ec455718 100644 --- a/rai/node/bootstrap.cpp +++ b/rai/node/bootstrap.cpp @@ -5,6 +5,9 @@ #include +// Updated 1-27-18 +constexpr unsigned bootstrap_peer_frontier_minimum = rai::rai_network == rai::rai_networks::rai_live_network ? 339000 : 0; + rai::block_synchronization::block_synchronization (boost::log::sources::logger_mt & log_a) : log (log_a) { @@ -420,7 +423,7 @@ void rai::frontier_req_client::received_frontier (boost::system::error_code cons { try { - promise.set_value (false); + promise.set_value (count < bootstrap_peer_frontier_minimum); } catch (std::future_error &) {