From 677d56a7fa684b62569d5504f242294798bbba23 Mon Sep 17 00:00:00 2001 From: evoskuil Date: Tue, 21 May 2024 19:43:50 -0400 Subject: [PATCH] Rename preconfirm to validate. --- Makefile.am | 6 +-- builds/cmake/CMakeLists.txt | 4 +- .../libbitcoin-node-test.vcxproj | 2 +- .../libbitcoin-node-test.vcxproj.filters | 6 +-- .../libbitcoin-node/libbitcoin-node.vcxproj | 4 +- .../libbitcoin-node.vcxproj.filters | 12 ++--- include/bitcoin/node.hpp | 2 +- include/bitcoin/node/chase.hpp | 22 ++++----- .../bitcoin/node/chasers/chaser_confirm.hpp | 2 +- ...ser_preconfirm.hpp => chaser_validate.hpp} | 10 ++-- include/bitcoin/node/chasers/chasers.hpp | 2 +- include/bitcoin/node/error.hpp | 2 +- include/bitcoin/node/full_node.hpp | 2 +- .../node/impl/chasers/chaser_organize.ipp | 14 +++--- src/chasers/chaser_confirm.cpp | 12 ++--- ...ser_preconfirm.cpp => chaser_validate.cpp} | 46 +++++++++---------- src/error.cpp | 2 +- src/full_node.cpp | 6 +-- ...ser_preconfirm.cpp => chaser_validate.cpp} | 4 +- test/error.cpp | 6 +-- 20 files changed, 83 insertions(+), 83 deletions(-) rename include/bitcoin/node/chasers/{chaser_preconfirm.hpp => chaser_validate.hpp} (89%) rename src/chasers/{chaser_preconfirm.cpp => chaser_validate.cpp} (85%) rename test/chasers/{chaser_preconfirm.cpp => chaser_validate.cpp} (90%) diff --git a/Makefile.am b/Makefile.am index 07177afb..d39b89b3 100644 --- a/Makefile.am +++ b/Makefile.am @@ -45,11 +45,11 @@ src_libbitcoin_node_la_SOURCES = \ src/chasers/chaser_check.cpp \ src/chasers/chaser_confirm.cpp \ src/chasers/chaser_header.cpp \ - src/chasers/chaser_preconfirm.cpp \ src/chasers/chaser_snapshot.cpp \ src/chasers/chaser_storage.cpp \ src/chasers/chaser_template.cpp \ src/chasers/chaser_transaction.cpp \ + src/chasers/chaser_validate.cpp \ src/protocols/protocol.cpp \ src/protocols/protocol_block_in.cpp \ src/protocols/protocol_block_in_31800.cpp \ @@ -89,9 +89,9 @@ test_libbitcoin_node_test_SOURCES = \ test/chasers/chaser_check.cpp \ test/chasers/chaser_confirm.cpp \ test/chasers/chaser_header.cpp \ - test/chasers/chaser_preconfirm.cpp \ test/chasers/chaser_template.cpp \ test/chasers/chaser_transaction.cpp \ + test/chasers/chaser_validate.cpp \ test/protocols/protocol.cpp \ test/sessions/session.cpp @@ -140,11 +140,11 @@ include_bitcoin_node_chasers_HEADERS = \ include/bitcoin/node/chasers/chaser_confirm.hpp \ include/bitcoin/node/chasers/chaser_header.hpp \ include/bitcoin/node/chasers/chaser_organize.hpp \ - include/bitcoin/node/chasers/chaser_preconfirm.hpp \ include/bitcoin/node/chasers/chaser_snapshot.hpp \ include/bitcoin/node/chasers/chaser_storage.hpp \ include/bitcoin/node/chasers/chaser_template.hpp \ include/bitcoin/node/chasers/chaser_transaction.hpp \ + include/bitcoin/node/chasers/chaser_validate.hpp \ include/bitcoin/node/chasers/chasers.hpp include_bitcoin_node_impl_chasersdir = ${includedir}/bitcoin/node/impl/chasers diff --git a/builds/cmake/CMakeLists.txt b/builds/cmake/CMakeLists.txt index e0ca876a..6bb6e5f4 100644 --- a/builds/cmake/CMakeLists.txt +++ b/builds/cmake/CMakeLists.txt @@ -255,11 +255,11 @@ add_library( ${CANONICAL_LIB_NAME} "../../src/chasers/chaser_check.cpp" "../../src/chasers/chaser_confirm.cpp" "../../src/chasers/chaser_header.cpp" - "../../src/chasers/chaser_preconfirm.cpp" "../../src/chasers/chaser_snapshot.cpp" "../../src/chasers/chaser_storage.cpp" "../../src/chasers/chaser_template.cpp" "../../src/chasers/chaser_transaction.cpp" + "../../src/chasers/chaser_validate.cpp" "../../src/protocols/protocol.cpp" "../../src/protocols/protocol_block_in.cpp" "../../src/protocols/protocol_block_in_31800.cpp" @@ -329,9 +329,9 @@ if (with-tests) "../../test/chasers/chaser_check.cpp" "../../test/chasers/chaser_confirm.cpp" "../../test/chasers/chaser_header.cpp" - "../../test/chasers/chaser_preconfirm.cpp" "../../test/chasers/chaser_template.cpp" "../../test/chasers/chaser_transaction.cpp" + "../../test/chasers/chaser_validate.cpp" "../../test/protocols/protocol.cpp" "../../test/sessions/session.cpp" ) diff --git a/builds/msvc/vs2022/libbitcoin-node-test/libbitcoin-node-test.vcxproj b/builds/msvc/vs2022/libbitcoin-node-test/libbitcoin-node-test.vcxproj index 6f34b987..f6c0ac61 100644 --- a/builds/msvc/vs2022/libbitcoin-node-test/libbitcoin-node-test.vcxproj +++ b/builds/msvc/vs2022/libbitcoin-node-test/libbitcoin-node-test.vcxproj @@ -75,9 +75,9 @@ - + diff --git a/builds/msvc/vs2022/libbitcoin-node-test/libbitcoin-node-test.vcxproj.filters b/builds/msvc/vs2022/libbitcoin-node-test/libbitcoin-node-test.vcxproj.filters index 0132d7f2..b8dd021e 100644 --- a/builds/msvc/vs2022/libbitcoin-node-test/libbitcoin-node-test.vcxproj.filters +++ b/builds/msvc/vs2022/libbitcoin-node-test/libbitcoin-node-test.vcxproj.filters @@ -36,15 +36,15 @@ src\chasers - - src\chasers - src\chasers src\chasers + + src\chasers + src diff --git a/builds/msvc/vs2022/libbitcoin-node/libbitcoin-node.vcxproj b/builds/msvc/vs2022/libbitcoin-node/libbitcoin-node.vcxproj index 3ef76293..01ab576a 100644 --- a/builds/msvc/vs2022/libbitcoin-node/libbitcoin-node.vcxproj +++ b/builds/msvc/vs2022/libbitcoin-node/libbitcoin-node.vcxproj @@ -78,11 +78,11 @@ - + @@ -114,11 +114,11 @@ - + diff --git a/builds/msvc/vs2022/libbitcoin-node/libbitcoin-node.vcxproj.filters b/builds/msvc/vs2022/libbitcoin-node/libbitcoin-node.vcxproj.filters index e1d61288..8d44ffe5 100644 --- a/builds/msvc/vs2022/libbitcoin-node/libbitcoin-node.vcxproj.filters +++ b/builds/msvc/vs2022/libbitcoin-node/libbitcoin-node.vcxproj.filters @@ -63,9 +63,6 @@ src\chasers - - src\chasers - src\chasers @@ -78,6 +75,9 @@ src\chasers + + src\chasers + src @@ -167,9 +167,6 @@ include\bitcoin\node\chasers - - include\bitcoin\node\chasers - include\bitcoin\node\chasers @@ -182,6 +179,9 @@ include\bitcoin\node\chasers + + include\bitcoin\node\chasers + include\bitcoin\node\chasers diff --git a/include/bitcoin/node.hpp b/include/bitcoin/node.hpp index 84087ec0..ed2a916e 100644 --- a/include/bitcoin/node.hpp +++ b/include/bitcoin/node.hpp @@ -31,11 +31,11 @@ #include #include #include -#include #include #include #include #include +#include #include #include #include diff --git a/include/bitcoin/node/chase.hpp b/include/bitcoin/node/chase.hpp index d5f572c9..dae47f1f 100644 --- a/include/bitcoin/node/chase.hpp +++ b/include/bitcoin/node/chase.hpp @@ -30,7 +30,7 @@ enum class chase /// ----------------------------------------------------------------------- /// Chasers directed to start operating (height_t). - /// Issued by 'full_node' and handled by 'preconfirm'. + /// Issued by 'full_node' and handled by 'validate'. start, /// Disk space is limited (count_t). @@ -38,7 +38,7 @@ enum class chase space, /// Chaser is directed to start when there are no downloads (height_t). - /// Issued by 'organize' and handled by 'preconfirm'. + /// Issued by 'organize' and handled by 'validate'. bump, /// Channels (all) directed to stop (channel_t). @@ -87,12 +87,12 @@ enum class chase /// Late-stage Invalidity. /// ----------------------------------------------------------------------- - /// unchecked, unpreconfirmable or unconfirmable was handled (height_t). - /// Issued by 'organize' and handled by 'preconfirm' (disorgs candidates). + /// unchecked, unvalid or unconfirmable was handled (height_t). + /// Issued by 'organize' and handled by 'validate' (disorgs candidates). disorganized, /// stored block was determined to be malleated (invalid) (header_t). - /// Issued by 'preconfirm' and 'confirm', handled by 'chaser' (redownload). + /// Issued by 'validate' and 'confirm', handled by 'chaser' (redownload). malleated, /// Validation. @@ -106,13 +106,13 @@ enum class chase /// Issued by 'block_in_31800' and handled by 'header'. unchecked, - /// A branch has become preconfirmable (height_t). - /// Issued by 'preconfirm' and handled by 'confirm'. - preconfirmable, + /// A branch has become valid (height_t). + /// Issued by 'validate' and handled by 'confirm'. + valid, - /// A checked block has failed preconfirmability (header_t). - /// Issued by 'preconfirm' and handled by 'header'. - unpreconfirmable, + /// A checked block has failed validation (header_t). + /// Issued by 'validate' and handled by 'header'. + unvalid, /// Confirmation. /// ----------------------------------------------------------------------- diff --git a/include/bitcoin/node/chasers/chaser_confirm.hpp b/include/bitcoin/node/chasers/chaser_confirm.hpp index e0c503f1..58fa8dff 100644 --- a/include/bitcoin/node/chasers/chaser_confirm.hpp +++ b/include/bitcoin/node/chasers/chaser_confirm.hpp @@ -45,7 +45,7 @@ class BCN_API chaser_confirm virtual bool handle_event(const code& ec, chase event_, event_value value) NOEXCEPT; - virtual void do_preconfirmed(height_t height) NOEXCEPT; + virtual void do_validated(height_t height) NOEXCEPT; virtual code confirm(const database::header_link& link, size_t height) NOEXCEPT; diff --git a/include/bitcoin/node/chasers/chaser_preconfirm.hpp b/include/bitcoin/node/chasers/chaser_validate.hpp similarity index 89% rename from include/bitcoin/node/chasers/chaser_preconfirm.hpp rename to include/bitcoin/node/chasers/chaser_validate.hpp index 27d81578..df9dbbfd 100644 --- a/include/bitcoin/node/chasers/chaser_preconfirm.hpp +++ b/include/bitcoin/node/chasers/chaser_validate.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_PRECONFIRM_HPP -#define LIBBITCOIN_NODE_CHASERS_CHASER_PRECONFIRM_HPP +#ifndef LIBBITCOIN_NODE_CHASERS_CHASER_VALIDATE_HPP +#define LIBBITCOIN_NODE_CHASERS_CHASER_VALIDATE_HPP #include #include @@ -29,13 +29,13 @@ namespace node { class full_node; /// Chase down blocks in the the candidate header chain for validation. -class BCN_API chaser_preconfirm +class BCN_API chaser_validate : public chaser { public: - DELETE_COPY_MOVE_DESTRUCT(chaser_preconfirm); + DELETE_COPY_MOVE_DESTRUCT(chaser_validate); - chaser_preconfirm(full_node& node) NOEXCEPT; + chaser_validate(full_node& node) NOEXCEPT; code start() NOEXCEPT override; diff --git a/include/bitcoin/node/chasers/chasers.hpp b/include/bitcoin/node/chasers/chasers.hpp index 0c18de29..248e0412 100644 --- a/include/bitcoin/node/chasers/chasers.hpp +++ b/include/bitcoin/node/chasers/chasers.hpp @@ -25,7 +25,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/include/bitcoin/node/error.hpp b/include/bitcoin/node/error.hpp index 1b78a011..facc0558 100644 --- a/include/bitcoin/node/error.hpp +++ b/include/bitcoin/node/error.hpp @@ -86,7 +86,7 @@ enum error_t : uint8_t set_confirmed, block_confirmable, set_txs_connected, - set_block_preconfirmable, + set_block_valid, /// query composite node_push, diff --git a/include/bitcoin/node/full_node.hpp b/include/bitcoin/node/full_node.hpp index 0f762368..f071c484 100644 --- a/include/bitcoin/node/full_node.hpp +++ b/include/bitcoin/node/full_node.hpp @@ -156,7 +156,7 @@ class BCN_API full_node chaser_block chaser_block_; chaser_header chaser_header_; chaser_check chaser_check_; - chaser_preconfirm chaser_preconfirm_; + chaser_validate chaser_validate_; chaser_confirm chaser_confirm_; chaser_transaction chaser_transaction_; chaser_template chaser_template_; diff --git a/include/bitcoin/node/impl/chasers/chaser_organize.ipp b/include/bitcoin/node/impl/chasers/chaser_organize.ipp index 074d8807..09b80649 100644 --- a/include/bitcoin/node/impl/chasers/chaser_organize.ipp +++ b/include/bitcoin/node/impl/chasers/chaser_organize.ipp @@ -105,7 +105,7 @@ bool CLASS::handle_event(const code&, chase event_, event_value value) NOEXCEPT switch (event_) { case chase::unchecked: - case chase::unpreconfirmable: + case chase::unvalid: case chase::unconfirmable: { POST(do_disorganize, possible_narrow_cast(value)); @@ -172,10 +172,10 @@ void CLASS::do_organize(typename Block::cptr& block_ptr, // This eventually stops the peer, but the full set of headers may // still cycle through to become strong, despite this being stored // as block_unconfirmable from a block validate or confirm failure. - // Block preconfirmation will then fail and this cycle will - // continue until a strong candidate chain is located. The cycle - // occurs because peers continue to send the same headers,which - // may indicate an local failure or peer failures. + // Block validation will then fail and this cycle will continue + // until a strong candidate chain is located. The cycle occurs + // because peers continue to send the same headers, which may + // indicate a local failure or peer failures. handler(ec, height); return; } @@ -341,10 +341,10 @@ void CLASS::do_organize(typename Block::cptr& block_ptr, // is already downloaded, then new header will arrive and download will // be skipped, resulting in stall until restart at which time the start // event will advance through all downloaded candidates and progress on - // arrivals. This bumps preconfirmation for current strong headers. + // arrivals. This bumps validation for current strong headers. notify(error::success, chase::bump, add1(branch_point)); - // Start block downloads, which upon completion bumps preconfirmation. + // Start block downloads, which upon completion bumps validation. notify(error::success, chase_object(), branch_point); } diff --git a/src/chasers/chaser_confirm.cpp b/src/chasers/chaser_confirm.cpp index c791c260..4fe50d4f 100644 --- a/src/chasers/chaser_confirm.cpp +++ b/src/chasers/chaser_confirm.cpp @@ -63,12 +63,12 @@ bool chaser_confirm::handle_event(const code&, chase event_, { case chase::block: { - POST(do_preconfirmed, possible_narrow_cast(value)); + POST(do_validated, possible_narrow_cast(value)); break; } - case chase::preconfirmable: + case chase::valid: { - POST(do_preconfirmed, possible_narrow_cast(value)); + POST(do_validated, possible_narrow_cast(value)); break; } case chase::stop: @@ -84,7 +84,7 @@ bool chaser_confirm::handle_event(const code&, chase event_, return true; } -// Blocks are either confirmed (blocks first) or preconfirmed/confirmed +// Blocks are either confirmed (blocks first) or validated/confirmed // (headers first) at this point. An unconfirmable block may not land here. // Candidate chain reorganizations will result in reported heights moving // in any direction. Each is treated as independent and only one representing @@ -94,7 +94,7 @@ bool chaser_confirm::handle_event(const code&, chase event_, // The scans are extremely fast and tiny in all typical scnearios, so it may // not improve performance or be worth spending 32 bytes per header to store // work, especially since individual header work is obtained from 4 bytes. -void chaser_confirm::do_preconfirmed(height_t height) NOEXCEPT +void chaser_confirm::do_validated(height_t height) NOEXCEPT { BC_ASSERT(stranded()); @@ -271,7 +271,7 @@ code chaser_confirm::confirm(const header_link& link, size_t height) NOEXCEPT ec == database::error::block_unconfirmable) return ec; - if (ec == database::error::block_preconfirmable) + if (ec == database::error::block_valid) return error::success; // Should not get here without a known block state. diff --git a/src/chasers/chaser_preconfirm.cpp b/src/chasers/chaser_validate.cpp similarity index 85% rename from src/chasers/chaser_preconfirm.cpp rename to src/chasers/chaser_validate.cpp index 5e64bbea..74e76ff0 100644 --- a/src/chasers/chaser_preconfirm.cpp +++ b/src/chasers/chaser_validate.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 @@ -26,7 +26,7 @@ namespace libbitcoin { namespace node { -#define CLASS chaser_preconfirm +#define CLASS chaser_validate using namespace system; using namespace system::chain; @@ -36,21 +36,21 @@ using namespace std::placeholders; BC_PUSH_WARNING(NO_THROW_IN_NOEXCEPT) -chaser_preconfirm::chaser_preconfirm(full_node& node) NOEXCEPT +chaser_validate::chaser_validate(full_node& node) NOEXCEPT : chaser(node), initial_subsidy_(node.config().bitcoin.initial_subsidy()), subsidy_interval_blocks_(node.config().bitcoin.subsidy_interval_blocks) { } -code chaser_preconfirm::start() NOEXCEPT +code chaser_validate::start() NOEXCEPT { update_position(archive().get_fork()); SUBSCRIBE_EVENTS(handle_event, _1, _2, _3); return error::success; } -bool chaser_preconfirm::handle_event(const code&, chase event_, +bool chaser_validate::handle_event(const code&, chase event_, event_value value) NOEXCEPT { if (closed()) @@ -105,7 +105,7 @@ bool chaser_preconfirm::handle_event(const code&, chase event_, // track downloaded in order (to validate) // ---------------------------------------------------------------------------- -void chaser_preconfirm::do_regressed(height_t branch_point) NOEXCEPT +void chaser_validate::do_regressed(height_t branch_point) NOEXCEPT { BC_ASSERT(stranded()); @@ -114,7 +114,7 @@ void chaser_preconfirm::do_regressed(height_t branch_point) NOEXCEPT do_disorganized(branch_point); } -void chaser_preconfirm::do_disorganized(height_t top) NOEXCEPT +void chaser_validate::do_disorganized(height_t top) NOEXCEPT { BC_ASSERT(stranded()); @@ -123,7 +123,7 @@ void chaser_preconfirm::do_disorganized(height_t top) NOEXCEPT do_checked(top); } -void chaser_preconfirm::do_checked(height_t height) NOEXCEPT +void chaser_validate::do_checked(height_t height) NOEXCEPT { BC_ASSERT(stranded()); @@ -132,7 +132,7 @@ void chaser_preconfirm::do_checked(height_t height) NOEXCEPT do_bump(height); } -void chaser_preconfirm::do_bump(height_t) NOEXCEPT +void chaser_validate::do_bump(height_t) NOEXCEPT { BC_ASSERT(stranded()); auto& query = archive(); @@ -155,11 +155,11 @@ void chaser_preconfirm::do_bump(height_t) NOEXCEPT { if (code == error::validation_bypass || code == database::error::block_confirmable || - code == database::error::block_preconfirmable) + code == database::error::block_valid) { // Advance. ++position(); - notify(code, chase::preconfirmable, height); + notify(code, chase::valid, height); fire(events::validate_bypassed, height); continue; } @@ -184,18 +184,18 @@ void chaser_preconfirm::do_bump(height_t) NOEXCEPT return; } - notify(code, chase::unpreconfirmable, link); + notify(code, chase::unvalid, link); fire(events::block_unconfirmable, height); } - LOGR("Unpreconfirmed block [" << height << "] " << code.message()); + LOGR("Unvalidated block [" << height << "] " << code.message()); return; } // Commit validation metadata. // .................................................................... - // TODO: set fees on preconfirmable because prevout.value() populated. + // TODO: set fees on valid because prevout.value() populated. // TODO: in concurrent model sum fees from each validated_tx record. // [set_txs_connected] FOR PERFORMANCE EVALUATION ONLY. // Tx validation/states are independent of block validation. @@ -205,9 +205,9 @@ void chaser_preconfirm::do_bump(height_t) NOEXCEPT return; } - if (!query.set_block_preconfirmable(link)) + if (!query.set_block_valid(link)) { - fault(error::set_block_preconfirmable); + fault(error::set_block_valid); return; } @@ -215,12 +215,12 @@ void chaser_preconfirm::do_bump(height_t) NOEXCEPT // .................................................................... ++position(); - notify(error::success, chase::preconfirmable, height); + notify(error::success, chase::valid, height); fire(events::block_validated, height); } } -code chaser_preconfirm::validate(const header_link& link, +code chaser_validate::validate(const header_link& link, size_t height) NOEXCEPT { code ec{}; @@ -232,7 +232,7 @@ code chaser_preconfirm::validate(const header_link& link, ec = query.get_block_state(link); if (ec == database::error::block_confirmable || ec == database::error::block_unconfirmable || - ec == database::error::block_preconfirmable) + ec == database::error::block_valid) return ec; database::context context{}; @@ -268,7 +268,7 @@ code chaser_preconfirm::validate(const header_link& link, // ---------------------------------------------------------------------------- // Returns null_hash if not found, intended for genesis block. -hash_digest chaser_preconfirm::get_neutrino(size_t height) const NOEXCEPT +hash_digest chaser_validate::get_neutrino(size_t height) const NOEXCEPT { hash_digest neutrino{}; const auto& query = archive(); @@ -279,7 +279,7 @@ hash_digest chaser_preconfirm::get_neutrino(size_t height) const NOEXCEPT } // This can only fail if block missing or prevouts are not fully populated. -bool chaser_preconfirm::update_neutrino(const header_link& link) NOEXCEPT +bool chaser_validate::update_neutrino(const header_link& link) NOEXCEPT { const auto& query = archive(); if (!query.neutrino_enabled()) @@ -294,7 +294,7 @@ bool chaser_preconfirm::update_neutrino(const header_link& link) NOEXCEPT } // This can only fail if prevouts are not fully populated. -bool chaser_preconfirm::update_neutrino(const header_link& link, +bool chaser_validate::update_neutrino(const header_link& link, const chain::block& block) NOEXCEPT { auto& query = archive(); @@ -310,7 +310,7 @@ bool chaser_preconfirm::update_neutrino(const header_link& link, } -void chaser_preconfirm::update_position(size_t height) NOEXCEPT +void chaser_validate::update_position(size_t height) NOEXCEPT { set_position(height); neutrino_ = get_neutrino(position()); diff --git a/src/error.cpp b/src/error.cpp index 79a27421..4112d021 100644 --- a/src/error.cpp +++ b/src/error.cpp @@ -76,7 +76,7 @@ DEFINE_ERROR_T_MESSAGE_MAP(error) { set_confirmed, "set_confirmed" }, { block_confirmable, "block_confirmable" }, { set_txs_connected, "set_txs_connected" }, - { set_block_preconfirmable, "set_block_preconfirmable" }, + { set_block_valid, "set_block_valid" }, /// query composite { node_push, "node_push" }, diff --git a/src/full_node.cpp b/src/full_node.cpp index aac84602..c74bd95a 100644 --- a/src/full_node.cpp +++ b/src/full_node.cpp @@ -40,7 +40,7 @@ full_node::full_node(query& query, const configuration& configuration, chaser_block_(*this), chaser_header_(*this), chaser_check_(*this), - chaser_preconfirm_(*this), + chaser_validate_(*this), chaser_confirm_(*this), chaser_transaction_(*this), chaser_template_(*this), @@ -79,7 +79,7 @@ void full_node::do_start(const result_handler& handler) NOEXCEPT chaser_header_.stopping(ec); chaser_block_.stopping(ec); chaser_check_.stopping(ec); - chaser_preconfirm_.stopping(ec); + chaser_validate_.stopping(ec); chaser_confirm_.stopping(ec); chaser_transaction_.stopping(ec); chaser_template_.stopping(ec); @@ -92,7 +92,7 @@ void full_node::do_start(const result_handler& handler) NOEXCEPT chaser_header_.start() : chaser_block_.start()))) || ((ec = chaser_check_.start())) || - ((ec = chaser_preconfirm_.start())) || + ((ec = chaser_validate_.start())) || ((ec = chaser_confirm_.start())) || ((ec = chaser_transaction_.start())) || ((ec = chaser_template_.start())) || diff --git a/test/chasers/chaser_preconfirm.cpp b/test/chasers/chaser_validate.cpp similarity index 90% rename from test/chasers/chaser_preconfirm.cpp rename to test/chasers/chaser_validate.cpp index e7ea6e46..f38ccb35 100644 --- a/test/chasers/chaser_preconfirm.cpp +++ b/test/chasers/chaser_validate.cpp @@ -18,9 +18,9 @@ */ #include "../test.hpp" -BOOST_AUTO_TEST_SUITE(chaser_preconfirm_tests) +BOOST_AUTO_TEST_SUITE(chaser_validate_tests) -BOOST_AUTO_TEST_CASE(chaser_preconfirm_test) +BOOST_AUTO_TEST_CASE(chaser_validate_test) { BOOST_REQUIRE(true); } diff --git a/test/error.cpp b/test/error.cpp index 1242b70b..b29008c1 100644 --- a/test/error.cpp +++ b/test/error.cpp @@ -402,13 +402,13 @@ BOOST_AUTO_TEST_CASE(error_t__code__set_txs_connected__true_exected_message) BOOST_REQUIRE_EQUAL(ec.message(), "set_txs_connected"); } -BOOST_AUTO_TEST_CASE(error_t__code__set_block_preconfirmable__true_exected_message) +BOOST_AUTO_TEST_CASE(error_t__code__set_block_valid__true_exected_message) { - constexpr auto value = error::set_block_preconfirmable; + constexpr auto value = error::set_block_valid; const auto ec = code(value); BOOST_REQUIRE(ec); BOOST_REQUIRE(ec == value); - BOOST_REQUIRE_EQUAL(ec.message(), "set_block_preconfirmable"); + BOOST_REQUIRE_EQUAL(ec.message(), "set_block_valid"); } // query composite