Merge 2534141e19 into merged_master (Elements PR ElementsProject/elements#1219)

This commit is contained in:
Byron Hambly 2024-11-27 14:53:17 +02:00
commit d78604da4c
129 changed files with 52697 additions and 22 deletions

View file

@ -1089,6 +1089,10 @@ bool MemPoolAccept::PolicyScriptChecks(const ATMPArgs& args, Workspace& ws)
scriptVerifyFlags |= SCRIPT_SIGHASH_RANGEPROOF;
}
if (DeploymentActiveAfter(m_active_chainstate.m_chain.Tip(), ChainstateManager({args.m_chainparams, GetAdjustedTime}), Consensus::DEPLOYMENT_SIMPLICITY)) {
scriptVerifyFlags |= SCRIPT_VERIFY_SIMPLICITY;
}
// Check input scripts and signatures.
// This is done last to help prevent CPU exhaustion denial-of-service attacks.
if (!CheckInputScripts(tx, state, m_view, scriptVerifyFlags, true, false, ws.m_precomputed_txdata)) {
@ -2108,6 +2112,10 @@ static unsigned int GetBlockScriptFlags(const CBlockIndex& block_index, const Ch
flags |= SCRIPT_SIGHASH_RANGEPROOF;
}
if (DeploymentActiveAfter(block_index.pprev, chainman, Consensus::DEPLOYMENT_SIMPLICITY)) {
flags |= SCRIPT_VERIFY_SIMPLICITY;
}
return flags;
}