Skip to content

Commit

Permalink
Merge pull request #515 from evoskuil/master
Browse files Browse the repository at this point in the history
Return error::txs_empty for block_confirmable() with no txs.
  • Loading branch information
evoskuil authored Oct 15, 2024
2 parents 4576f39 + e20c8d0 commit 913efcb
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions include/bitcoin/database/impl/query/confirm.ipp
Original file line number Diff line number Diff line change
Expand Up @@ -383,7 +383,7 @@ code CLASS::tx_confirmable(const tx_link& link,
return error::success;
}

// Used by node for sequential by block (unsed).
// Used by node for sequential by block (unused).
// split(0) 403 secs for 400k-410k
TEMPLATE
code CLASS::block_confirmable(const header_link& link) const NOEXCEPT
Expand All @@ -392,11 +392,11 @@ code CLASS::block_confirmable(const header_link& link) const NOEXCEPT
if (!get_context(ctx, link))
return error::integrity;

code ec{};
const auto txs = to_transactions(link);
if (txs.empty())
return ec;
return error::txs_empty;

code ec{};
if ((ec = unspent_duplicates(txs.front(), ctx)))
return ec;

Expand Down

0 comments on commit 913efcb

Please sign in to comment.