diff --git a/console/executor_scans.cpp b/console/executor_scans.cpp index b1874012..5005932d 100644 --- a/console/executor_scans.cpp +++ b/console/executor_scans.cpp @@ -432,7 +432,7 @@ void executor::scan_collisions() const const auto transactions = query_.to_transactions(link); for (const auto& transaction: transactions) { - const auto inputs = query_.to_tx_spends(transaction); + const auto inputs = query_.to_spends(transaction); for (const auto& in: inputs) { ++total; diff --git a/src/chasers/chaser_check.cpp b/src/chasers/chaser_check.cpp index ea102d61..a5fa49fe 100644 --- a/src/chasers/chaser_check.cpp +++ b/src/chasers/chaser_check.cpp @@ -381,7 +381,6 @@ size_t chaser_check::set_unassociated() NOEXCEPT << count << ") last (" << requested_ << ")."); - ////notify(error::success, chase::checking, requested_); return count; } diff --git a/src/chasers/chaser_confirm.cpp b/src/chasers/chaser_confirm.cpp index 526dcc63..8c1667d8 100644 --- a/src/chasers/chaser_confirm.cpp +++ b/src/chasers/chaser_confirm.cpp @@ -43,7 +43,7 @@ chaser_confirm::chaser_confirm(full_node& node) NOEXCEPT : chaser(node), concurrent_(node.config().node.concurrent_confirmation), threadpool_(1_u32, node.config().node.priority_validation ? - network::thread_priority::highest : network::thread_priority::high), + network::thread_priority::high : network::thread_priority::normal), strand_(threadpool_.service().get_executor()) { } @@ -86,7 +86,7 @@ bool chaser_confirm::handle_event(const code&, chase event_, return true; // An unconfirmable block height must not land here. - // These can come out of order, advance in order synchronously. + // These come out of order, advance in order synchronously. switch (event_) { ////case chase::blocks: @@ -127,14 +127,6 @@ bool chaser_confirm::handle_event(const code&, chase event_, break; } - ////case chase::checking: - ////{ - //// BC_ASSERT(std::holds_alternative(value)); - //// ////POST(do_checking, std::get(value)); - //// boost::asio::post(strand_, - //// BIND(do_checking, std::get(value))); - //// break; - ////} case chase::regressed: { BC_ASSERT(std::holds_alternative(value)); @@ -164,10 +156,6 @@ bool chaser_confirm::handle_event(const code&, chase event_, return true; } -////void chaser_confirm::do_checking(height_t height) NOEXCEPT -////{ -////} - void chaser_confirm::do_regressed(height_t branch_point) NOEXCEPT { BC_ASSERT(stranded()); @@ -194,6 +182,9 @@ void chaser_confirm::do_validated(height_t height) NOEXCEPT do_bump(height); } +// TODO: This is a simplified variant of the full implementation below. +// This variant doesn't implement the relative work check and instead confirms +// one block at a time, just like validation. void chaser_confirm::do_bump(height_t) NOEXCEPT { BC_ASSERT(stranded()); @@ -224,6 +215,7 @@ void chaser_confirm::do_bump(height_t) NOEXCEPT return; } + // Confirmation query. if ((ec = query.block_confirmable(link))) { if (ec == database::error::integrity) @@ -287,6 +279,7 @@ void chaser_confirm::do_bump(height_t) NOEXCEPT // database::error::unknown_state [shouldn't be here] // database::error::unassociated [shouldn't be here] // database::error::unvalidated [shouldn't be here] + fault(error::confirm8); return; } diff --git a/src/chasers/chaser_validate.cpp b/src/chasers/chaser_validate.cpp index 8e72a1c3..84e48f71 100644 --- a/src/chasers/chaser_validate.cpp +++ b/src/chasers/chaser_validate.cpp @@ -241,8 +241,7 @@ void chaser_validate::validate_block(const header_link& link) NOEXCEPT block->populate(); if (!query.populate(*block)) { - // This could instead be a case of invalid milestone. - ////POST(complete_block, error::validate3, link, ctx.height); + ////POST(complete_block, error::validate3, link, ctx.height); boost::asio::post(strand_, BIND(complete_block, error::validate3, link, ctx.height)); return; @@ -253,9 +252,7 @@ void chaser_validate::validate_block(const header_link& link) NOEXCEPT ((ec = block->connect(ctx)))) { if (!query.set_block_unconfirmable(link)) - { ec = error::validate4; - } } else if (!query.set_block_valid(link)) {