Skip to content

Commit

Permalink
consensus: Enforce WITNESS rules only if the segwit is active
Browse files Browse the repository at this point in the history
  • Loading branch information
lateminer committed Sep 19, 2024
1 parent a3317da commit a7519b1
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/validation.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2124,8 +2124,8 @@ static unsigned int GetBlockScriptFlags(const CBlockIndex& block_index, const Ch
}

// Enforce WITNESS rules whenever P2SH is in effect (and the segwit
// deployment is defined).
if (flags & SCRIPT_VERIFY_P2SH && DeploymentEnabled(consensusparams, Consensus::DEPLOYMENT_SEGWIT)) {
// deployment is active).
if (flags & SCRIPT_VERIFY_P2SH && DeploymentActiveAt(block_index, chainman, Consensus::DEPLOYMENT_SEGWIT)) {
flags |= SCRIPT_VERIFY_WITNESS;
}

Expand Down

0 comments on commit a7519b1

Please sign in to comment.