From b22eacad5a00a5b84c6211fa520b8942d8a4e627 Mon Sep 17 00:00:00 2001 From: evoskuil Date: Mon, 10 Jun 2024 20:50:56 -0400 Subject: [PATCH 1/2] Comment. --- src/chasers/chaser_validate.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/chasers/chaser_validate.cpp b/src/chasers/chaser_validate.cpp index 503c60a4..32c018f1 100644 --- a/src/chasers/chaser_validate.cpp +++ b/src/chasers/chaser_validate.cpp @@ -190,6 +190,9 @@ void chaser_validate::do_bump(height_t) NOEXCEPT continue; } + // Skipped validation here always succeeds but doesn't set block_valid. + // So this will always start reporting after the top block_confirmable. + // TODO: validation. ////// TODO: the quantity of work must be throttled. ////// This will very rapidly pump all outstanding work into asio queue. From c78e108604f507979203562ec67b9ca993544411 Mon Sep 17 00:00:00 2001 From: evoskuil Date: Wed, 12 Jun 2024 10:36:04 -0400 Subject: [PATCH 2/2] Adapt to database change. --- console/executor.cpp | 10 +++++----- src/chasers/chaser_validate.cpp | 2 +- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/console/executor.cpp b/console/executor.cpp index 48991e64..3c9d3286 100644 --- a/console/executor.cpp +++ b/console/executor.cpp @@ -699,7 +699,7 @@ void executor::scan_collisions() const while (!cancel_ && (++index < query_.header_records())) { const header_link link{ possible_narrow_cast(index) }; - const auto transactions = query_.to_txs(link); + const auto transactions = query_.to_transactions(link); for (const auto& transaction: transactions) { const auto inputs = query_.to_tx_spends(transaction); @@ -882,7 +882,7 @@ void executor::read_test() const // Get confirmed output tx block position. auto out_position = max_uint16; table::txs::get_position txs{ {}, tx_fk }; - if (!store_.txs.get(query_.to_txs_link(block_fk), txs)) + if (!store_.txs.get(query_.to_txs(block_fk), txs)) return; else out_position = possible_narrow_cast(txs.position); @@ -920,7 +920,7 @@ void executor::read_test() const table::txs::get_position in_txs{ {}, in_tx_fk }; if (!in_bk_fk.is_terminal()) { - if (!store_.txs.get(query_.to_txs_link(in_bk_fk), in_txs)) + if (!store_.txs.get(query_.to_txs(in_bk_fk), in_txs)) return; else in_position = possible_narrow_cast(in_txs.position); @@ -1101,7 +1101,7 @@ void executor::read_test() const return; } - const auto txs = query_.to_txs(block); + const auto txs = query_.to_transactions(block); if (txs.empty()) { logger("!txs"); @@ -1355,7 +1355,7 @@ void executor::read_test() const //// break; ////} - ////const auto txs = query_.to_txs(link); + ////const auto txs = query_.to_transactions(link); ////if (txs.empty()) ////{ //// logger("Failure: to_txs"); diff --git a/src/chasers/chaser_validate.cpp b/src/chasers/chaser_validate.cpp index 32c018f1..e2900dce 100644 --- a/src/chasers/chaser_validate.cpp +++ b/src/chasers/chaser_validate.cpp @@ -216,7 +216,7 @@ bool chaser_validate::enqueue_block(const header_link& link) NOEXCEPT const auto& query = archive(); database::context context{}; - const auto txs = query.to_txs(link); + const auto txs = query.to_transactions(link); if (txs.empty() || !query.get_context(context, link)) return false;