From 1c70a3a83c7b7fea48cad4c33849de35a37ac453 Mon Sep 17 00:00:00 2001 From: evoskuil Date: Thu, 27 Jun 2024 15:38:46 -0400 Subject: [PATCH] Comments on fee caching. --- src/chasers/chaser_confirm.cpp | 8 +++----- src/chasers/chaser_validate.cpp | 3 +++ 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/src/chasers/chaser_confirm.cpp b/src/chasers/chaser_confirm.cpp index bcf16a20..7b333899 100644 --- a/src/chasers/chaser_confirm.cpp +++ b/src/chasers/chaser_confirm.cpp @@ -369,11 +369,9 @@ void chaser_confirm::confirm_block(const code& ec, const header_link& link, return; } - // TODO: could compute fees from validation records, but - // TODO: validation records don't exist for checked blocks. - // TODO: so set this in block_in protocol for all checked blocks. - const auto fees = uint64_t{}; - if (!query.set_block_confirmable(link, fees)) + // TODO: move fee setter to set_block_valid (transitory) and propagate to + // TODO: set_block_confirmable (final). Bypassed do not have the fee cache. + if (!query.set_block_confirmable(link, uint64_t{})) { fault(error::set_block_confirmable); return; diff --git a/src/chasers/chaser_validate.cpp b/src/chasers/chaser_validate.cpp index 946ee14a..fc240e2b 100644 --- a/src/chasers/chaser_validate.cpp +++ b/src/chasers/chaser_validate.cpp @@ -183,6 +183,7 @@ void chaser_validate::do_bump(height_t) NOEXCEPT } else { + // Validation is currently bypassed in all cases. ////// TODO: the quantity of work must be throttled. ////// Will very rapidly pump outstanding work in asio queue. ////if (!enqueue_block(link)) @@ -364,6 +365,8 @@ void chaser_validate::validate_block(const code& ec, return; } + // TODO: move fee setter to set_block_valid (transitory) and propagate to + // TODO: set_block_confirmable (final). Bypassed do not have the fee cache. if (!query.set_block_valid(link)) { fault(error::set_block_valid);