Skip to content

Commit

Permalink
Comments on fee caching.
Browse files Browse the repository at this point in the history
  • Loading branch information
evoskuil committed Jun 27, 2024
1 parent e3065e6 commit 1c70a3a
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
8 changes: 3 additions & 5 deletions src/chasers/chaser_confirm.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
3 changes: 3 additions & 0 deletions src/chasers/chaser_validate.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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))
Expand Down Expand Up @@ -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);
Expand Down

0 comments on commit 1c70a3a

Please sign in to comment.