diff --git a/src/validation.cpp b/src/validation.cpp index 0b6f4f1878..3952b6b84f 100644 --- a/src/validation.cpp +++ b/src/validation.cpp @@ -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; }