Skip to content

Commit

Permalink
Merge pull request #1486 from evoskuil/master
Browse files Browse the repository at this point in the history
Comments, whitespace.
  • Loading branch information
evoskuil authored Jun 29, 2024
2 parents 1d05c4a + a9c1097 commit 22ebdd3
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions src/chain/block.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -747,12 +747,11 @@ code block::confirm_transactions(const context& ctx) const NOEXCEPT
// The block header is checked/accepted independently.

// context free.
// Node relies on error::block_malleated.
// Node relies on error::invalid_transaction_commitment.
// TODO: use of get_hash() in is_forward_reference makes this thread unsafe.
code block::check(bool bypass) const NOEXCEPT
{
// Node relies on error::block_malleated.
// Node relies on error::invalid_transaction_commitment.

// 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 @@ -785,15 +784,14 @@ code block::check(bool bypass) const NOEXCEPT
// median_time_past

// context required.
// Node relies on error::invalid_witness_commitment.
// TODO: use of get_hash() in is_hash_limit_exceeded makes this thread unsafe.
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;

if (bypass)
return error::block_success;

Expand Down

0 comments on commit 22ebdd3

Please sign in to comment.