From 83e919951a96d295286a258c0a61aedcdf437e2c Mon Sep 17 00:00:00 2001 From: Eric Voskuil Date: Tue, 20 Oct 2026 14:21:55 -0400 Subject: [PATCH] Rename chaser_check to chaser_download. --- include/bitcoin/node.hpp | 2 +- include/bitcoin/node/chase.hpp | 28 ++-- .../{chaser_check.hpp => chaser_download.hpp} | 10 +- include/bitcoin/node/chasers/chasers.hpp | 2 +- include/bitcoin/node/full_node.hpp | 2 +- .../protocols/protocol_block_in_31800.hpp | 2 +- .../{chaser_check.cpp => chaser_download.cpp} | 62 +++---- src/chasers/chaser_header.cpp | 2 +- src/full_node.cpp | 14 +- src/protocols/protocol_block_in_31800.cpp | 10 +- .../{chaser_check.cpp => chaser_download.cpp} | 152 +++++++++--------- 11 files changed, 143 insertions(+), 143 deletions(-) rename include/bitcoin/node/chasers/{chaser_check.hpp => chaser_download.hpp} (94%) rename src/chasers/{chaser_check.cpp => chaser_download.cpp} (90%) rename test/chasers/{chaser_check.cpp => chaser_download.cpp} (78%) diff --git a/include/bitcoin/node.hpp b/include/bitcoin/node.hpp index 3c9847b4..62038915 100644 --- a/include/bitcoin/node.hpp +++ b/include/bitcoin/node.hpp @@ -31,7 +31,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/include/bitcoin/node/chase.hpp b/include/bitcoin/node/chase.hpp index aac0df3a..f8f9e837 100644 --- a/include/bitcoin/node/chase.hpp +++ b/include/bitcoin/node/chase.hpp @@ -42,7 +42,7 @@ enum class chase /// ----------------------------------------------------------------------- /// Chasers directed to start operating. - /// Issued by 'full_node' and handled by 'check', 'validate', 'confirm'. + /// Issued by 'full_node' and handled by 'download', 'validate', 'confirm'. start, /// Disk space is limited. @@ -54,7 +54,7 @@ enum class chase snap, /// Chaser directed to attempt start from its current position. - /// Issued by 'organize' and handled by 'check', 'validate', 'confirm'. + /// Issued by 'organize' and handled by 'download', 'validate', 'confirm'. bump, /// Channels (all) directed to stop with the given code. @@ -62,7 +62,7 @@ enum class chase suspend, /// Chasers (all) directed to resume following suspend. - /// Issued by 'full_node' and handled by 'check', 'validate', 'confirm'. + /// Issued by 'full_node' and handled by 'download', 'validate', 'confirm'. resume, /// Node is recovering from disk full condition. @@ -70,19 +70,19 @@ enum class chase unfull, /// Channel starved for work. - /// Issued by 'block_in_31800' and handled by 'check'. + /// Issued by 'block_in_31800' and handled by 'download'. starved, /// Channel (slow) directed to split work and stop. - /// Issued by 'check' and handled by 'block_in_31800'. + /// Issued by 'download' and handled by 'block_in_31800'. split, /// Channels (all with work) directed to split work and stop. - /// Issued by 'check' and handled by 'block_in_31800'. + /// Issued by 'download' and handled by 'block_in_31800'. stall, /// Channels (all with work) directed to drop work and stop. - /// Issued by 'check' and handled by 'block_in_31800'. + /// Issued by 'download' and handled by 'block_in_31800'. purge, /// Channels (all) directed to write work count to the log. @@ -93,26 +93,26 @@ enum class chase /// ----------------------------------------------------------------------- /// A new candidate branch exists from given branch point. - /// Issued by 'header' and handled by 'check'. + /// Issued by 'header' and handled by 'download'. headers, /// New candidate headers without txs exist. - /// Issued by 'check' and handled by 'block_in_31800'. + /// Issued by 'download' and handled by 'block_in_31800'. download, /// The candidate chain has been reorganized (branched below its top). - /// Issued by 'organize' and handled by 'check', 'validate', 'confirm'. + /// Issued by 'organize' and handled by 'download', 'validate', 'confirm'. regressed, /// unchecked, unvalid or unconfirmable was handled. - /// Issued by 'organize' and handled by 'check', 'validate', 'confirm'. + /// Issued by 'organize' and handled by 'download', 'validate', 'confirm'. disorganized, /// Check/Identify. /// ----------------------------------------------------------------------- /// A block has been downloaded, checked and stored. - /// Issued by 'block_in_31800', handled by 'check', 'validate'. + /// Issued by 'block_in_31800', handled by 'download', 'validate'. /// Populate is bypassed for checkpoint/milestone blocks. checked, @@ -121,14 +121,14 @@ enum class chase unchecked, /// A downloaded window is completed by check. - /// Issued by 'check' and handled by 'validate'. + /// Issued by 'download' and handled by 'validate'. windowed, /// Accept/Connect. /// ----------------------------------------------------------------------- /// A branch has become valid. - /// Issued by 'validate' and handled by 'check', 'confirm'. + /// Issued by 'validate' and handled by 'download', 'confirm'. valid, /// A checked block has failed validation. diff --git a/include/bitcoin/node/chasers/chaser_check.hpp b/include/bitcoin/node/chasers/chaser_download.hpp similarity index 94% rename from include/bitcoin/node/chasers/chaser_check.hpp rename to include/bitcoin/node/chasers/chaser_download.hpp index 7b1f2161..af6c04e5 100644 --- a/include/bitcoin/node/chasers/chaser_check.hpp +++ b/include/bitcoin/node/chasers/chaser_download.hpp @@ -16,8 +16,8 @@ * You should have received a copy of the GNU Affero General Public License * along with this program. If not, see . */ -#ifndef LIBBITCOIN_NODE_CHASERS_CHASER_CHECK_HPP -#define LIBBITCOIN_NODE_CHASERS_CHASER_CHECK_HPP +#ifndef LIBBITCOIN_NODE_CHASERS_CHASER_DOWNLOAD_HPP +#define LIBBITCOIN_NODE_CHASERS_CHASER_DOWNLOAD_HPP #include #include @@ -30,11 +30,11 @@ namespace node { class full_node; /// Maintain set of pending downloads identifiers for candidate header chain. -class BCN_API chaser_check +class BCN_API chaser_download : public chaser { public: - DELETE_COPY_MOVE_DESTRUCT(chaser_check); + DELETE_COPY_MOVE_DESTRUCT(chaser_download); /// Create empty shared map. static map_ptr empty_map() NOEXCEPT; @@ -42,7 +42,7 @@ class BCN_API chaser_check /// Move half of map into returned map. static map_ptr split(const map_ptr& map) NOEXCEPT; - chaser_check(full_node& node) NOEXCEPT; + chaser_download(full_node& node) NOEXCEPT; /// Initialize chaser state. code start() NOEXCEPT override; diff --git a/include/bitcoin/node/chasers/chasers.hpp b/include/bitcoin/node/chasers/chasers.hpp index 224d0bb1..7ebbb9ab 100644 --- a/include/bitcoin/node/chasers/chasers.hpp +++ b/include/bitcoin/node/chasers/chasers.hpp @@ -20,7 +20,7 @@ #define LIBBITCOIN_NODE_CHASERS_CHASERS_HPP #include -#include +#include #include #include #include diff --git a/include/bitcoin/node/full_node.hpp b/include/bitcoin/node/full_node.hpp index 63abeae9..db1b3ff0 100644 --- a/include/bitcoin/node/full_node.hpp +++ b/include/bitcoin/node/full_node.hpp @@ -208,7 +208,7 @@ class BCN_API full_node // These are protected by strand. chaser_header chaser_header_; - chaser_check chaser_check_; + chaser_download chaser_download_; chaser_validate chaser_validate_; chaser_confirm chaser_confirm_; chaser_transaction chaser_transaction_; diff --git a/include/bitcoin/node/protocols/protocol_block_in_31800.hpp b/include/bitcoin/node/protocols/protocol_block_in_31800.hpp index 3b93263c..dd8a059e 100644 --- a/include/bitcoin/node/protocols/protocol_block_in_31800.hpp +++ b/include/bitcoin/node/protocols/protocol_block_in_31800.hpp @@ -42,7 +42,7 @@ class BCN_API protocol_block_in_31800 block_type_(session->node_settings().require_witness ? type_id::witness_block : type_id::block), node_pruned_(session->node_settings().limited_blocks), - map_(chaser_check::empty_map()), + map_(chaser_download::empty_map()), network::tracker(session->log) { } diff --git a/src/chasers/chaser_check.cpp b/src/chasers/chaser_download.cpp similarity index 90% rename from src/chasers/chaser_check.cpp rename to src/chasers/chaser_download.cpp index 90e70779..29ef7545 100644 --- a/src/chasers/chaser_check.cpp +++ b/src/chasers/chaser_download.cpp @@ -16,7 +16,7 @@ * You should have received a copy of the GNU Affero General Public License * along with this program. If not, see . */ -#include +#include #include #include @@ -27,7 +27,7 @@ namespace libbitcoin { namespace node { -#define CLASS chaser_check +#define CLASS chaser_download using namespace system; using namespace system::chain; @@ -58,7 +58,7 @@ size_t get_step(size_t connections, size_t maximum_concurrency) NOEXCEPT return std::min(maximum_concurrency, span); } -chaser_check::chaser_check(full_node& node) NOEXCEPT +chaser_download::chaser_download(full_node& node) NOEXCEPT : chaser(node), allowed_deviation_(node.node_settings().allowed_deviation), maximum_concurrency_(node.node_settings().maximum_concurrency_()), @@ -71,13 +71,13 @@ chaser_check::chaser_check(full_node& node) NOEXCEPT } // static -map_ptr chaser_check::empty_map() NOEXCEPT +map_ptr chaser_download::empty_map() NOEXCEPT { return std::make_shared(); } // static -map_ptr chaser_check::split(const map_ptr& map) NOEXCEPT +map_ptr chaser_download::split(const map_ptr& map) NOEXCEPT { const auto half = empty_map(); auto& index = map->get(); @@ -92,7 +92,7 @@ map_ptr chaser_check::split(const map_ptr& map) NOEXCEPT // `position` tracks the contiguous chain of associated candidate blocks. // `requested` tracks the last height of the current download window. // `advanced` tracks `requested` less window blocks not yet validated. -code chaser_check::start() NOEXCEPT +code chaser_download::start() NOEXCEPT { start_tracking(); compact_timer_ = std::make_shared(log, strand()); @@ -105,7 +105,7 @@ code chaser_check::start() NOEXCEPT return error::success; } -void chaser_check::stopping(const code& ec) NOEXCEPT +void chaser_download::stopping(const code& ec) NOEXCEPT { if (compact_timer_) compact_timer_->stop(); @@ -115,7 +115,7 @@ void chaser_check::stopping(const code& ec) NOEXCEPT chaser::stopping(ec); } -bool chaser_check::handle_chase(const code&, event_value value) NOEXCEPT +bool chaser_download::handle_chase(const code&, event_value value) NOEXCEPT { if (closed()) return false; @@ -182,7 +182,7 @@ bool chaser_check::handle_chase(const code&, event_value value) NOEXCEPT return true; } -void chaser_check::start_tracking() NOEXCEPT +void chaser_download::start_tracking() NOEXCEPT { // Called from start. ////BC_ASSERT(stranded()); @@ -190,7 +190,7 @@ void chaser_check::start_tracking() NOEXCEPT job_ = std::make_shared(BIND(handle_purged, _1)); } -void chaser_check::stop_tracking() NOEXCEPT +void chaser_download::stop_tracking() NOEXCEPT { // Called by stop (node thread). ////BC_ASSERT(stranded()); @@ -200,17 +200,17 @@ void chaser_check::stop_tracking() NOEXCEPT job_.reset(); } -void chaser_check::handle_purged(const code& ec) NOEXCEPT +void chaser_download::handle_purged(const code& ec) NOEXCEPT { if (closed()) return; boost::asio::post(strand(), - std::bind(&chaser_check::do_handle_purged, + std::bind(&chaser_download::do_handle_purged, this, ec)); } -void chaser_check::do_handle_purged(const code&) NOEXCEPT +void chaser_download::do_handle_purged(const code&) NOEXCEPT { BC_ASSERT(stranded()); @@ -221,7 +221,7 @@ void chaser_check::do_handle_purged(const code&) NOEXCEPT // starved // ---------------------------------------------------------------------------- -void chaser_check::do_starved(object_t self) NOEXCEPT +void chaser_download::do_starved(object_t self) NOEXCEPT { BC_ASSERT(stranded()); @@ -255,7 +255,7 @@ void chaser_check::do_starved(object_t self) NOEXCEPT // update // ---------------------------------------------------------------------------- -void chaser_check::update(object_key channel, uint64_t speed, +void chaser_download::update(object_key channel, uint64_t speed, network::result_handler&& handler) NOEXCEPT { if (closed()) @@ -275,7 +275,7 @@ std::string to_kilobits_per_second(double value) NOEXCEPT return encode_base10(to_integer(kilobits)); } -void chaser_check::do_update(object_key channel, uint64_t speed, +void chaser_download::do_update(object_key channel, uint64_t speed, const network::result_handler& handler) NOEXCEPT { BC_ASSERT(stranded()); @@ -345,7 +345,7 @@ void chaser_check::do_update(object_key channel, uint64_t speed, // regression // ---------------------------------------------------------------------------- -void chaser_check::do_regressed(height_t branch_point) NOEXCEPT +void chaser_download::do_regressed(height_t branch_point) NOEXCEPT { BC_ASSERT(stranded()); @@ -366,7 +366,7 @@ void chaser_check::do_regressed(height_t branch_point) NOEXCEPT // track downloaded in order (to move download window) // ---------------------------------------------------------------------------- -void chaser_check::do_advanced(height_t) NOEXCEPT +void chaser_download::do_advanced(height_t) NOEXCEPT { BC_ASSERT(stranded()); @@ -378,7 +378,7 @@ void chaser_check::do_advanced(height_t) NOEXCEPT do_headers({}); } -void chaser_check::do_checked(height_t height) NOEXCEPT +void chaser_download::do_checked(height_t height) NOEXCEPT { BC_ASSERT(stranded()); @@ -387,7 +387,7 @@ void chaser_check::do_checked(height_t height) NOEXCEPT do_bump({}); } -void chaser_check::do_bump(height_t) NOEXCEPT +void chaser_download::do_bump(height_t) NOEXCEPT { BC_ASSERT(stranded()); if (purging()) @@ -413,7 +413,7 @@ void chaser_check::do_bump(height_t) NOEXCEPT // add headers // ---------------------------------------------------------------------------- -void chaser_check::do_headers(height_t) NOEXCEPT +void chaser_download::do_headers(height_t) NOEXCEPT { BC_ASSERT(stranded()); @@ -424,12 +424,12 @@ void chaser_check::do_headers(height_t) NOEXCEPT // get/put hashes // ---------------------------------------------------------------------------- -bool chaser_check::purging() const NOEXCEPT +bool chaser_download::purging() const NOEXCEPT { return !job_; } -void chaser_check::get_hashes(map_handler&& handler) NOEXCEPT +void chaser_download::get_hashes(map_handler&& handler) NOEXCEPT { if (closed()) return; @@ -437,7 +437,7 @@ void chaser_check::get_hashes(map_handler&& handler) NOEXCEPT POST(do_get_hashes, std::move(handler)); } -void chaser_check::put_hashes(const map_ptr& map, +void chaser_download::put_hashes(const map_ptr& map, result_handler&& handler) NOEXCEPT { if (closed()) @@ -446,7 +446,7 @@ void chaser_check::put_hashes(const map_ptr& map, POST(do_put_hashes, map, std::move(handler)); } -void chaser_check::do_get_hashes(const map_handler& handler) NOEXCEPT +void chaser_download::do_get_hashes(const map_handler& handler) NOEXCEPT { BC_ASSERT(stranded()); if (closed() || purging()) @@ -455,7 +455,7 @@ void chaser_check::do_get_hashes(const map_handler& handler) NOEXCEPT handler(error::success, get_map(), job_); } -void chaser_check::do_put_hashes(const map_ptr& map, +void chaser_download::do_put_hashes(const map_ptr& map, const result_handler& handler) NOEXCEPT { BC_ASSERT(stranded()); @@ -472,13 +472,13 @@ void chaser_check::do_put_hashes(const map_ptr& map, // utilities // ---------------------------------------------------------------------------- -map_ptr chaser_check::get_map() NOEXCEPT +map_ptr chaser_download::get_map() NOEXCEPT { BC_ASSERT(stranded()); return maps_.empty() ? empty_map() : pop_front(maps_); } -bool chaser_check::set_map(const map_ptr& map) NOEXCEPT +bool chaser_download::set_map(const map_ptr& map) NOEXCEPT { // Called from start. ////BC_ASSERT(stranded()); @@ -493,7 +493,7 @@ bool chaser_check::set_map(const map_ptr& map) NOEXCEPT // Get all unassociated block records from start to stop heights. // Groups records into table sets by inventory set size, limited by advance. // Return the total number of records obtained and set requested_ to last. -size_t chaser_check::set_unassociated() NOEXCEPT +size_t chaser_download::set_unassociated() NOEXCEPT { // Called from start. ////BC_ASSERT(stranded()); @@ -570,7 +570,7 @@ size_t chaser_check::set_unassociated() NOEXCEPT return count; } -void chaser_check::handle_compact_timer(const code& ec) NOEXCEPT +void chaser_download::handle_compact_timer(const code& ec) NOEXCEPT { BC_ASSERT(stranded()); if (ec == network::error::operation_canceled || closed()) @@ -581,7 +581,7 @@ void chaser_check::handle_compact_timer(const code& ec) NOEXCEPT do_headers({}); } -size_t chaser_check::get_inventory_size() const NOEXCEPT +size_t chaser_download::get_inventory_size() const NOEXCEPT { if (is_zero(connections_) || !is_current_chain(false)) return {}; diff --git a/src/chasers/chaser_header.cpp b/src/chasers/chaser_header.cpp index 25b09fb7..1e62747e 100644 --- a/src/chasers/chaser_header.cpp +++ b/src/chasers/chaser_header.cpp @@ -379,7 +379,7 @@ void chaser_header::do_organize(const header::cptr& header_ptr, bumped_ = true; } - // This prevents download stall, the check chaser races ahead. + // This prevents download stall, the download chaser races ahead. // Start block downloads, which upon completion bumps validation. notify(error::success, chases::headers{ branch_point }); } diff --git a/src/full_node.cpp b/src/full_node.cpp index 8cf80e57..207d2822 100644 --- a/src/full_node.cpp +++ b/src/full_node.cpp @@ -42,7 +42,7 @@ full_node::full_node(query& query, const configuration& configuration, start_time_(zulu_time()), query_(query), chaser_header_(*this), - chaser_check_(*this), + chaser_download_(*this), chaser_validate_(*this), chaser_confirm_(*this), chaser_transaction_(*this), @@ -78,7 +78,7 @@ void full_node::do_start(const result_handler& handler) NOEXCEPT code ec{}; if (((ec = chaser_header_.start())) || - ((ec = chaser_check_.start())) || + ((ec = chaser_download_.start())) || ((ec = chaser_validate_.start())) || ((ec = chaser_confirm_.start())) || ((ec = chaser_transaction_.start())) || @@ -125,7 +125,7 @@ void full_node::close() NOEXCEPT // Block on chaser stop (including dedicated threadpool joins). chaser_header_.stop(); - chaser_check_.stop(); + chaser_download_.stop(); chaser_validate_.stop(); chaser_confirm_.stop(); chaser_transaction_.stop(); @@ -142,7 +142,7 @@ void full_node::do_close() NOEXCEPT // Initiate chaser stopping (including dedicated threadpools). chaser_header_.stopping(network::error::service_stopped); - chaser_check_.stopping(network::error::service_stopped); + chaser_download_.stopping(network::error::service_stopped); chaser_validate_.stopping(network::error::service_stopped); chaser_confirm_.stopping(network::error::service_stopped); chaser_transaction_.stopping(network::error::service_stopped); @@ -202,13 +202,13 @@ void full_node::submit_compact(const system::chain::transactions_cptr& txs, void full_node::get_hashes(map_handler&& handler) NOEXCEPT { - chaser_check_.get_hashes(std::move(handler)); + chaser_download_.get_hashes(std::move(handler)); } void full_node::put_hashes(const map_ptr& map, result_handler&& handler) NOEXCEPT { - chaser_check_.put_hashes(map, std::move(handler)); + chaser_download_.put_hashes(map, std::move(handler)); } // Events. @@ -486,7 +486,7 @@ void full_node::estimate(size_t target, estimator::mode mode, void full_node::performance(object_key key, uint64_t speed, result_handler&& handler) NOEXCEPT { - chaser_check_.update(key, speed, std::move(handler)); + chaser_download_.update(key, speed, std::move(handler)); } // Session attachments. diff --git a/src/protocols/protocol_block_in_31800.cpp b/src/protocols/protocol_block_in_31800.cpp index 2e06fd48..b06ecd59 100644 --- a/src/protocols/protocol_block_in_31800.cpp +++ b/src/protocols/protocol_block_in_31800.cpp @@ -80,7 +80,7 @@ void protocol_block_in_31800::stopping(const code& ec) NOEXCEPT { BC_ASSERT(stranded()); restore(map_); - map_ = chaser_check::empty_map(); + map_ = chaser_download::empty_map(); stop_performance(); unsubscribe_chase(); protocol_performer::stopping(ec); @@ -193,9 +193,9 @@ void protocol_block_in_31800::do_stall(peer_t) NOEXCEPT return; LOGV("Divide work (" << map_->size() << ") from [" << opposite() << "]."); - restore(chaser_check::split(map_)); + restore(chaser_download::split(map_)); restore(map_); - map_ = chaser_check::empty_map(); + map_ = chaser_download::empty_map(); stop(error::sacrificed_channel); } @@ -207,9 +207,9 @@ void protocol_block_in_31800::do_split(peer_t) NOEXCEPT return; LOGV("Split work (" << map_->size() << ") from [" << opposite() << "]."); - restore(chaser_check::split(map_)); + restore(chaser_download::split(map_)); restore(map_); - map_ = chaser_check::empty_map(); + map_ = chaser_download::empty_map(); stop(error::sacrificed_channel); } diff --git a/test/chasers/chaser_check.cpp b/test/chasers/chaser_download.cpp similarity index 78% rename from test/chasers/chaser_check.cpp rename to test/chasers/chaser_download.cpp index 35170b59..5f9fe608 100644 --- a/test/chasers/chaser_check.cpp +++ b/test/chasers/chaser_download.cpp @@ -32,7 +32,7 @@ using namespace network::messages::peer; BC_PUSH_WARNING(NO_THROW_IN_NOEXCEPT) // A current node whose chaser events are observable by the test. -struct chaser_check_setup_fixture +struct chaser_download_setup_fixture : p2p_setup_fixture { struct work @@ -42,7 +42,7 @@ struct chaser_check_setup_fixture job::ptr racer; }; - inline chaser_check_setup_fixture(const initializer& setup={}, + inline chaser_download_setup_fixture(const initializer& setup={}, const configurator& configure={}) : p2p_setup_fixture(setup, [=](configuration& config) { @@ -70,7 +70,7 @@ struct chaser_check_setup_fixture return false; } - /// Report channel performance to the check chaser. + /// Report channel performance to the download chaser. code update(object_key key, uint64_t speed) { std::promise promise{}; @@ -82,7 +82,7 @@ struct chaser_check_setup_fixture return promise.get_future().get(); } - /// Obtain work from the check chaser. + /// Obtain work from the download chaser. work get_hashes() { std::promise promise{}; @@ -95,7 +95,7 @@ struct chaser_check_setup_fixture return promise.get_future().get(); } - /// Return work to the check chaser. + /// Return work to the download chaser. code put_hashes(const map_ptr& map) { std::promise promise{}; @@ -107,7 +107,7 @@ struct chaser_check_setup_fixture return promise.get_future().get(); } - /// Take all candidate work from the check chaser as one map. + /// Take all candidate work from the download chaser as one map. map_ptr take_candidates() { const auto map = get_hashes().map; @@ -115,11 +115,11 @@ struct chaser_check_setup_fixture return map; } - /// Take work from the check chaser until count hashes (bounded). + /// Take work from the download chaser until count hashes (bounded). map_ptr take(size_t count) { using namespace std::chrono; - const auto map = chaser_check::empty_map(); + const auto map = chaser_download::empty_map(); const auto deadline = steady_clock::now() + seconds(10); while (steady_clock::now() < deadline && map->size() < count) { @@ -132,12 +132,12 @@ struct chaser_check_setup_fixture }; // Mainnet blocks 1 and 2 are unassociated candidates. -struct chaser_check_candidate_setup_fixture - : chaser_check_setup_fixture +struct chaser_download_candidate_setup_fixture + : chaser_download_setup_fixture { - inline chaser_check_candidate_setup_fixture( + inline chaser_download_candidate_setup_fixture( const configurator& configure={}) - : chaser_check_setup_fixture( + : chaser_download_setup_fixture( p2p_compact_candidate_setup_fixture::candidate, [=](configuration& config) { @@ -150,11 +150,11 @@ struct chaser_check_candidate_setup_fixture }; // Candidates on a node that does not store the blocks it has pruned. -struct chaser_check_pruned_setup_fixture - : chaser_check_candidate_setup_fixture +struct chaser_download_pruned_setup_fixture + : chaser_download_candidate_setup_fixture { - inline chaser_check_pruned_setup_fixture() - : chaser_check_candidate_setup_fixture([](configuration& config) + inline chaser_download_pruned_setup_fixture() + : chaser_download_candidate_setup_fixture([](configuration& config) { config.node.limited_blocks = true; }) @@ -163,11 +163,11 @@ struct chaser_check_pruned_setup_fixture }; // Candidates with a one second performance sample period. -struct chaser_check_sampled_setup_fixture - : chaser_check_candidate_setup_fixture +struct chaser_download_sampled_setup_fixture + : chaser_download_candidate_setup_fixture { - inline chaser_check_sampled_setup_fixture() - : chaser_check_candidate_setup_fixture([](configuration& config) + inline chaser_download_sampled_setup_fixture() + : chaser_download_candidate_setup_fixture([](configuration& config) { config.node.sample_period_seconds = 1; }) @@ -176,11 +176,11 @@ struct chaser_check_sampled_setup_fixture }; // Candidates with a one second sample period and no deviation monitor. -struct chaser_check_sampled_local_setup_fixture - : chaser_check_candidate_setup_fixture +struct chaser_download_sampled_local_setup_fixture + : chaser_download_candidate_setup_fixture { - inline chaser_check_sampled_local_setup_fixture() - : chaser_check_candidate_setup_fixture([](configuration& config) + inline chaser_download_sampled_local_setup_fixture() + : chaser_download_candidate_setup_fixture([](configuration& config) { config.node.sample_period_seconds = 1; config.node.allowed_deviation = 0; @@ -190,8 +190,8 @@ struct chaser_check_sampled_local_setup_fixture }; // Mainnet block 1 is an unassociated compact candidate. -struct chaser_check_compact_setup_fixture - : chaser_check_setup_fixture +struct chaser_download_compact_setup_fixture + : chaser_download_setup_fixture { static bool compact(node::query& query) NOEXCEPT { @@ -205,8 +205,8 @@ struct chaser_check_compact_setup_fixture query.push_candidate(link); } - inline chaser_check_compact_setup_fixture() - : chaser_check_setup_fixture(compact, [](configuration& config) + inline chaser_download_compact_setup_fixture() + : chaser_download_setup_fixture(compact, [](configuration& config) { config.node.compact_timeout_seconds = 1; }) @@ -215,12 +215,12 @@ struct chaser_check_compact_setup_fixture }; // A compact candidate deferred beyond a one second performance sample period. -struct chaser_check_compact_sampled_setup_fixture - : chaser_check_setup_fixture +struct chaser_download_compact_sampled_setup_fixture + : chaser_download_setup_fixture { - inline chaser_check_compact_sampled_setup_fixture() - : chaser_check_setup_fixture( - chaser_check_compact_setup_fixture::compact, + inline chaser_download_compact_sampled_setup_fixture() + : chaser_download_setup_fixture( + chaser_download_compact_setup_fixture::compact, [](configuration& config) { config.node.compact_timeout_seconds = 3; @@ -263,19 +263,19 @@ static database::association item(size_t height) NOEXCEPT return { {}, { possible_narrow_cast(height) }, context }; } -BOOST_AUTO_TEST_SUITE(chaser_check_tests) +BOOST_AUTO_TEST_SUITE(chaser_download_tests) // split -BOOST_AUTO_TEST_CASE(chaser_check__split__four__lower_half_split) +BOOST_AUTO_TEST_CASE(chaser_download__split__four__lower_half_split) { - const auto map = chaser_check::empty_map(); + const auto map = chaser_download::empty_map(); map->insert(item(4)); map->insert(item(1)); map->insert(item(3)); map->insert(item(2)); - const auto half = chaser_check::split(map); + const auto half = chaser_download::split(map); BOOST_REQUIRE_EQUAL(half->size(), two); BOOST_REQUIRE_EQUAL(map->size(), two); BOOST_REQUIRE(half->exists(size_t{ 1 })); @@ -284,36 +284,36 @@ BOOST_AUTO_TEST_CASE(chaser_check__split__four__lower_half_split) BOOST_REQUIRE(map->exists(size_t{ 4 })); } -BOOST_AUTO_TEST_CASE(chaser_check__split__one__empty_split) +BOOST_AUTO_TEST_CASE(chaser_download__split__one__empty_split) { - const auto map = chaser_check::empty_map(); + const auto map = chaser_download::empty_map(); map->insert(item(1)); - const auto half = chaser_check::split(map); + const auto half = chaser_download::split(map); BOOST_REQUIRE(half->empty()); BOOST_REQUIRE_EQUAL(map->size(), one); } // update -BOOST_FIXTURE_TEST_CASE(chaser_check__update__maximum__exhausted_channel, chaser_check_setup_fixture) +BOOST_FIXTURE_TEST_CASE(chaser_download__update__maximum__exhausted_channel, chaser_download_setup_fixture) { BOOST_REQUIRE(update(1, max_uint64) == node::error::exhausted_channel); } -BOOST_FIXTURE_TEST_CASE(chaser_check__update__zero__stalled_channel, chaser_check_setup_fixture) +BOOST_FIXTURE_TEST_CASE(chaser_download__update__zero__stalled_channel, chaser_download_setup_fixture) { BOOST_REQUIRE(update(1, 0) == node::error::stalled_channel); } -BOOST_FIXTURE_TEST_CASE(chaser_check__update__below_minimum_count__success, chaser_check_setup_fixture) +BOOST_FIXTURE_TEST_CASE(chaser_download__update__below_minimum_count__success, chaser_download_setup_fixture) { BOOST_REQUIRE(!update(1, 100)); BOOST_REQUIRE(!update(2, 1)); BOOST_REQUIRE(!update(3, 1)); } -BOOST_FIXTURE_TEST_CASE(chaser_check__update__not_below_mean__success, chaser_check_setup_fixture) +BOOST_FIXTURE_TEST_CASE(chaser_download__update__not_below_mean__success, chaser_download_setup_fixture) { BOOST_REQUIRE(!update(1, 100)); BOOST_REQUIRE(!update(2, 100)); @@ -321,7 +321,7 @@ BOOST_FIXTURE_TEST_CASE(chaser_check__update__not_below_mean__success, chaser_ch BOOST_REQUIRE(!update(4, 200)); } -BOOST_FIXTURE_TEST_CASE(chaser_check__update__below_mean_within_deviation__success, chaser_check_setup_fixture) +BOOST_FIXTURE_TEST_CASE(chaser_download__update__below_mean_within_deviation__success, chaser_download_setup_fixture) { BOOST_REQUIRE(!update(1, 100)); BOOST_REQUIRE(!update(2, 200)); @@ -329,7 +329,7 @@ BOOST_FIXTURE_TEST_CASE(chaser_check__update__below_mean_within_deviation__succe BOOST_REQUIRE(!update(4, 150)); } -BOOST_FIXTURE_TEST_CASE(chaser_check__update__below_mean_beyond_deviation__slow_channel, chaser_check_setup_fixture) +BOOST_FIXTURE_TEST_CASE(chaser_download__update__below_mean_beyond_deviation__slow_channel, chaser_download_setup_fixture) { BOOST_REQUIRE(!update(1, 100)); BOOST_REQUIRE(!update(2, 100)); @@ -340,7 +340,7 @@ BOOST_FIXTURE_TEST_CASE(chaser_check__update__below_mean_beyond_deviation__slow_ // starved -BOOST_FIXTURE_TEST_CASE(chaser_check__starved__recorded_speeds__slowest_other_split, chaser_check_setup_fixture) +BOOST_FIXTURE_TEST_CASE(chaser_download__starved__recorded_speeds__slowest_other_split, chaser_download_setup_fixture) { const auto key = subscribe(); BOOST_REQUIRE(!update(key, 100)); @@ -352,7 +352,7 @@ BOOST_FIXTURE_TEST_CASE(chaser_check__starved__recorded_speeds__slowest_other_sp BOOST_REQUIRE_EQUAL(split.channel, 42u); } -BOOST_FIXTURE_TEST_CASE(chaser_check__starved__no_speeds__stall, chaser_check_setup_fixture) +BOOST_FIXTURE_TEST_CASE(chaser_download__starved__no_speeds__stall, chaser_download_setup_fixture) { subscribe(); node_.notify({}, chases::starved{ 42 }); @@ -364,7 +364,7 @@ BOOST_FIXTURE_TEST_CASE(chaser_check__starved__no_speeds__stall, chaser_check_se // regressed -////BOOST_FIXTURE_TEST_CASE(chaser_check__regressed__below_window__purged_and_downloaded, chaser_check_candidate_setup_fixture) +////BOOST_FIXTURE_TEST_CASE(chaser_download__regressed__below_window__purged_and_downloaded, chaser_download_candidate_setup_fixture) ////{ //// subscribe(); //// node_.notify({}, chases::regressed{ 0 }); @@ -380,7 +380,7 @@ BOOST_FIXTURE_TEST_CASE(chaser_check__starved__no_speeds__stall, chaser_check_se //// BOOST_REQUIRE(get_hashes().map->exists(p2p_compact_setup_fixture::block2().hash())); ////} -////BOOST_FIXTURE_TEST_CASE(chaser_check__regressed__above_window__not_purged, chaser_check_candidate_setup_fixture) +////BOOST_FIXTURE_TEST_CASE(chaser_download__regressed__above_window__not_purged, chaser_download_candidate_setup_fixture) ////{ //// subscribe(); //// node_.notify({}, chases::regressed{ 5 }); @@ -391,7 +391,7 @@ BOOST_FIXTURE_TEST_CASE(chaser_check__starved__no_speeds__stall, chaser_check_se //// BOOST_REQUIRE_EQUAL(purge.branch_point, zero); ////} -////BOOST_FIXTURE_TEST_CASE(chaser_check__disorganized__below_window__purged, chaser_check_candidate_setup_fixture) +////BOOST_FIXTURE_TEST_CASE(chaser_download__disorganized__below_window__purged, chaser_download_candidate_setup_fixture) ////{ //// subscribe(); //// node_.notify({}, chases::disorganized{ 0 }); @@ -403,7 +403,7 @@ BOOST_FIXTURE_TEST_CASE(chaser_check__starved__no_speeds__stall, chaser_check_se // get_hashes/put_hashes -BOOST_FIXTURE_TEST_CASE(chaser_check__get_hashes__candidates__expected_map, chaser_check_candidate_setup_fixture) +BOOST_FIXTURE_TEST_CASE(chaser_download__get_hashes__candidates__expected_map, chaser_download_candidate_setup_fixture) { const auto work = get_hashes(); BOOST_REQUIRE(!work.ec); @@ -414,7 +414,7 @@ BOOST_FIXTURE_TEST_CASE(chaser_check__get_hashes__candidates__expected_map, chas BOOST_REQUIRE(get_hashes().map->empty()); } -BOOST_FIXTURE_TEST_CASE(chaser_check__put_hashes__taken_map__download_and_restored, chaser_check_candidate_setup_fixture) +BOOST_FIXTURE_TEST_CASE(chaser_download__put_hashes__taken_map__download_and_restored, chaser_download_candidate_setup_fixture) { subscribe(); const auto map = take_candidates(); @@ -426,7 +426,7 @@ BOOST_FIXTURE_TEST_CASE(chaser_check__put_hashes__taken_map__download_and_restor BOOST_REQUIRE_EQUAL(get_hashes().map->size(), two); } -BOOST_FIXTURE_TEST_CASE(chaser_check__get_hashes__purging__dropped, chaser_check_candidate_setup_fixture) +BOOST_FIXTURE_TEST_CASE(chaser_download__get_hashes__purging__dropped, chaser_download_candidate_setup_fixture) { subscribe(); auto work = get_hashes(); @@ -450,7 +450,7 @@ BOOST_FIXTURE_TEST_CASE(chaser_check__get_hashes__purging__dropped, chaser_check // checked -BOOST_FIXTURE_TEST_CASE(chaser_check__checked__window_downloaded__windowed, chaser_check_candidate_setup_fixture) +BOOST_FIXTURE_TEST_CASE(chaser_download__checked__window_downloaded__windowed, chaser_download_candidate_setup_fixture) { subscribe(); BOOST_REQUIRE(handshake(peer_services)); @@ -465,7 +465,7 @@ BOOST_FIXTURE_TEST_CASE(chaser_check__checked__window_downloaded__windowed, chas // valid -BOOST_FIXTURE_TEST_CASE(chaser_check__valid__requested_not_positioned__no_download, chaser_check_candidate_setup_fixture) +BOOST_FIXTURE_TEST_CASE(chaser_download__valid__requested_not_positioned__no_download, chaser_download_candidate_setup_fixture) { subscribe(); node_.notify({}, chases::valid{ 1 }); @@ -484,7 +484,7 @@ BOOST_FIXTURE_TEST_CASE(chaser_check__valid__requested_not_positioned__no_downlo // bump -BOOST_FIXTURE_TEST_CASE(chaser_check__bump__purging__download_on_purged, chaser_check_candidate_setup_fixture) +BOOST_FIXTURE_TEST_CASE(chaser_download__bump__purging__download_on_purged, chaser_download_candidate_setup_fixture) { subscribe(); auto work = get_hashes(); @@ -507,7 +507,7 @@ BOOST_FIXTURE_TEST_CASE(chaser_check__bump__purging__download_on_purged, chaser_ // compact -////BOOST_FIXTURE_TEST_CASE(chaser_check__handle_compact_timer__expired__download, chaser_check_compact_setup_fixture) +////BOOST_FIXTURE_TEST_CASE(chaser_download__handle_compact_timer__expired__download, chaser_download_compact_setup_fixture) ////{ //// subscribe(); @@ -521,7 +521,7 @@ BOOST_AUTO_TEST_SUITE_END() BOOST_AUTO_TEST_SUITE(protocol_block_in_31800_tests) -BOOST_FIXTURE_TEST_CASE(protocol_block_in_31800__subscribed__candidates__get_data, chaser_check_candidate_setup_fixture) +BOOST_FIXTURE_TEST_CASE(protocol_block_in_31800__subscribed__candidates__get_data, chaser_download_candidate_setup_fixture) { BOOST_REQUIRE(handshake(peer_services)); @@ -532,7 +532,7 @@ BOOST_FIXTURE_TEST_CASE(protocol_block_in_31800__subscribed__candidates__get_dat BOOST_REQUIRE(request->items.back().hash == p2p_compact_setup_fixture::block2().hash()); } -BOOST_FIXTURE_TEST_CASE(protocol_block_in_31800__handle_receive_block__unrequested__not_stopped, chaser_check_candidate_setup_fixture) +BOOST_FIXTURE_TEST_CASE(protocol_block_in_31800__handle_receive_block__unrequested__not_stopped, chaser_download_candidate_setup_fixture) { BOOST_REQUIRE(handshake(peer_services)); receive(get_data::command); @@ -546,7 +546,7 @@ BOOST_FIXTURE_TEST_CASE(protocol_block_in_31800__handle_receive_block__unrequest BOOST_REQUIRE_EQUAL(message->nonce, 42u); } -BOOST_FIXTURE_TEST_CASE(protocol_block_in_31800__handle_receive_block__malleated_transactions__stopped, chaser_check_candidate_setup_fixture) +BOOST_FIXTURE_TEST_CASE(protocol_block_in_31800__handle_receive_block__malleated_transactions__stopped, chaser_download_candidate_setup_fixture) { BOOST_REQUIRE(handshake(peer_services)); receive(get_data::command); @@ -560,7 +560,7 @@ BOOST_FIXTURE_TEST_CASE(protocol_block_in_31800__handle_receive_block__malleated BOOST_REQUIRE(!query_.is_associated(query_.to_header(block1.hash()))); } -BOOST_FIXTURE_TEST_CASE(protocol_block_in_31800__handle_receive_block__witness_before_bip141__stopped, chaser_check_candidate_setup_fixture) +BOOST_FIXTURE_TEST_CASE(protocol_block_in_31800__handle_receive_block__witness_before_bip141__stopped, chaser_download_candidate_setup_fixture) { BOOST_REQUIRE(handshake(peer_services)); receive(get_data::command); @@ -572,7 +572,7 @@ BOOST_FIXTURE_TEST_CASE(protocol_block_in_31800__handle_receive_block__witness_b BOOST_REQUIRE(!query_.is_associated(query_.to_header(witness_block1().hash()))); } -BOOST_FIXTURE_TEST_CASE(protocol_block_in_31800__handle_receive_block__pruned_witness__stopped, chaser_check_pruned_setup_fixture) +BOOST_FIXTURE_TEST_CASE(protocol_block_in_31800__handle_receive_block__pruned_witness__stopped, chaser_download_pruned_setup_fixture) { BOOST_REQUIRE(handshake(peer_services)); receive(get_data::command); @@ -583,7 +583,7 @@ BOOST_FIXTURE_TEST_CASE(protocol_block_in_31800__handle_receive_block__pruned_wi BOOST_REQUIRE(!query_.is_associated(query_.to_header(witness_block1().hash()))); } -BOOST_FIXTURE_TEST_CASE(protocol_block_in_31800__handle_receive_block__pruned__associated, chaser_check_pruned_setup_fixture) +BOOST_FIXTURE_TEST_CASE(protocol_block_in_31800__handle_receive_block__pruned__associated, chaser_download_pruned_setup_fixture) { BOOST_REQUIRE(handshake(peer_services)); receive(get_data::command); @@ -594,7 +594,7 @@ BOOST_FIXTURE_TEST_CASE(protocol_block_in_31800__handle_receive_block__pruned__a BOOST_REQUIRE(associated(block1.hash())); } -BOOST_FIXTURE_TEST_CASE(protocol_block_in_31800__handle_chase__report__not_stopped, chaser_check_candidate_setup_fixture) +BOOST_FIXTURE_TEST_CASE(protocol_block_in_31800__handle_chase__report__not_stopped, chaser_download_candidate_setup_fixture) { BOOST_REQUIRE(handshake(peer_services)); receive(get_data::command); @@ -610,7 +610,7 @@ BOOST_FIXTURE_TEST_CASE(protocol_block_in_31800__handle_chase__report__not_stopp BOOST_REQUIRE_EQUAL(message->nonce, 42u); } -BOOST_FIXTURE_TEST_CASE(protocol_block_in_31800__handle_chase__purge_with_work__stopped, chaser_check_candidate_setup_fixture) +BOOST_FIXTURE_TEST_CASE(protocol_block_in_31800__handle_chase__purge_with_work__stopped, chaser_download_candidate_setup_fixture) { BOOST_REQUIRE(handshake(peer_services)); receive(get_data::command); @@ -620,7 +620,7 @@ BOOST_FIXTURE_TEST_CASE(protocol_block_in_31800__handle_chase__purge_with_work__ BOOST_REQUIRE_THROW(receive(pong::command), boost::system::system_error); } -BOOST_FIXTURE_TEST_CASE(protocol_block_in_31800__handle_chase__stall_with_work__stopped_and_work_divided, chaser_check_candidate_setup_fixture) +BOOST_FIXTURE_TEST_CASE(protocol_block_in_31800__handle_chase__stall_with_work__stopped_and_work_divided, chaser_download_candidate_setup_fixture) { BOOST_REQUIRE(!put_hashes(take_candidates())); BOOST_REQUIRE(handshake(peer_services)); @@ -635,7 +635,7 @@ BOOST_FIXTURE_TEST_CASE(protocol_block_in_31800__handle_chase__stall_with_work__ BOOST_REQUIRE(map->exists(p2p_compact_setup_fixture::block2().hash())); } -BOOST_FIXTURE_TEST_CASE(protocol_block_in_31800__handle_chase__download_then_split__stopped, chaser_check_candidate_setup_fixture) +BOOST_FIXTURE_TEST_CASE(protocol_block_in_31800__handle_chase__download_then_split__stopped, chaser_download_candidate_setup_fixture) { subscribe(); const auto map = take_candidates(); @@ -655,7 +655,7 @@ BOOST_FIXTURE_TEST_CASE(protocol_block_in_31800__handle_chase__download_then_spl BOOST_REQUIRE(get_hashes().map->exists(p2p_compact_setup_fixture::block2().hash())); } -BOOST_FIXTURE_TEST_CASE(protocol_block_in_31800__handle_chase__download_with_work__not_stopped, chaser_check_candidate_setup_fixture) +BOOST_FIXTURE_TEST_CASE(protocol_block_in_31800__handle_chase__download_with_work__not_stopped, chaser_download_candidate_setup_fixture) { BOOST_REQUIRE(handshake(peer_services)); receive(get_data::command); @@ -671,7 +671,7 @@ BOOST_FIXTURE_TEST_CASE(protocol_block_in_31800__handle_chase__download_with_wor BOOST_REQUIRE_EQUAL(message->nonce, 42u); } -BOOST_FIXTURE_TEST_CASE(protocol_block_in_31800__handle_chase__purge_without_work__not_stopped, chaser_check_setup_fixture) +BOOST_FIXTURE_TEST_CASE(protocol_block_in_31800__handle_chase__purge_without_work__not_stopped, chaser_download_setup_fixture) { subscribe(); BOOST_REQUIRE(handshake(peer_services)); @@ -689,11 +689,11 @@ BOOST_FIXTURE_TEST_CASE(protocol_block_in_31800__handle_chase__purge_without_wor BOOST_REQUIRE_EQUAL(message->nonce, 42u); } -BOOST_FIXTURE_TEST_CASE(protocol_block_in_31800__handle_chase__split_single__not_stopped, chaser_check_candidate_setup_fixture) +BOOST_FIXTURE_TEST_CASE(protocol_block_in_31800__handle_chase__split_single__not_stopped, chaser_download_candidate_setup_fixture) { // The channel is given one of the two candidates (the other is held). const auto work = get_hashes(); - BOOST_REQUIRE(!put_hashes(chaser_check::split(work.map))); + BOOST_REQUIRE(!put_hashes(chaser_download::split(work.map))); BOOST_REQUIRE(handshake(peer_services)); receive(get_data::command); subscribe(); @@ -710,7 +710,7 @@ BOOST_FIXTURE_TEST_CASE(protocol_block_in_31800__handle_chase__split_single__not // performance -BOOST_FIXTURE_TEST_CASE(protocol_block_in_31800__performance__no_bytes__stopped, chaser_check_sampled_setup_fixture) +BOOST_FIXTURE_TEST_CASE(protocol_block_in_31800__performance__no_bytes__stopped, chaser_download_sampled_setup_fixture) { BOOST_REQUIRE(handshake(peer_services)); receive(get_data::command); @@ -718,7 +718,7 @@ BOOST_FIXTURE_TEST_CASE(protocol_block_in_31800__performance__no_bytes__stopped, BOOST_REQUIRE_THROW(receive(pong::command), boost::system::system_error); } -BOOST_FIXTURE_TEST_CASE(protocol_block_in_31800__performance__no_bytes_no_deviation__stopped, chaser_check_sampled_local_setup_fixture) +BOOST_FIXTURE_TEST_CASE(protocol_block_in_31800__performance__no_bytes_no_deviation__stopped, chaser_download_sampled_local_setup_fixture) { BOOST_REQUIRE(handshake(peer_services)); receive(get_data::command); @@ -726,7 +726,7 @@ BOOST_FIXTURE_TEST_CASE(protocol_block_in_31800__performance__no_bytes_no_deviat BOOST_REQUIRE_THROW(receive(pong::command), boost::system::system_error); } -////BOOST_FIXTURE_TEST_CASE(protocol_block_in_31800__performance__partial_then_no_bytes__stopped, chaser_check_sampled_setup_fixture) +////BOOST_FIXTURE_TEST_CASE(protocol_block_in_31800__performance__partial_then_no_bytes__stopped, chaser_download_sampled_setup_fixture) ////{ //// BOOST_REQUIRE(handshake(peer_services)); //// receive(get_data::command); @@ -738,7 +738,7 @@ BOOST_FIXTURE_TEST_CASE(protocol_block_in_31800__performance__no_bytes_no_deviat //// BOOST_REQUIRE_THROW(receive(pong::command), boost::system::system_error); ////} -BOOST_FIXTURE_TEST_CASE(protocol_block_in_31800__performance__idle__deferred_get_data, chaser_check_compact_sampled_setup_fixture) +BOOST_FIXTURE_TEST_CASE(protocol_block_in_31800__performance__idle__deferred_get_data, chaser_download_compact_sampled_setup_fixture) { BOOST_REQUIRE(handshake(peer_services));