Skip to content

Commit

Permalink
Comments.
Browse files Browse the repository at this point in the history
  • Loading branch information
evoskuil committed Jun 18, 2024
1 parent 62d2b12 commit 210027a
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/chain/block.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -746,9 +746,11 @@ code block::confirm_transactions(const context& ctx) const NOEXCEPT
// TODO: use of get_hash() in is_forward_reference makes this thread unsafe.
code block::check(bool bypass) const NOEXCEPT
{
// Node relies on error::invalid_transaction_commitment.
if (is_invalid_merkle_root())
return error::invalid_transaction_commitment;

// Node relies on error::block_malleated.
// type32 malleated is a subset of is_internal_double_spend
// type64 malleated is a subset of first_not_coinbase
if (bypass && is_malleated())
Expand Down Expand Up @@ -784,6 +786,7 @@ code block::check(const context& ctx, bool bypass) const NOEXCEPT
{
const auto bip141 = ctx.is_enabled(bip141_rule);

// Node relies on error::invalid_witness_commitment.
if (bip141 && is_invalid_witness_commitment())
return error::invalid_witness_commitment;

Expand Down

0 comments on commit 210027a

Please sign in to comment.