| 1062 | } |
| 1063 | |
| 1064 | bool MemPoolAccept::PolicyScriptChecks(const ATMPArgs& args, Workspace& ws) |
| 1065 | { |
| 1066 | AssertLockHeld(cs_main); |
| 1067 | AssertLockHeld(m_pool.cs); |
| 1068 | const CTransaction& tx = *ws.m_ptx; |
| 1069 | TxValidationState& state = ws.m_state; |
| 1070 | |
| 1071 | unsigned int scriptVerifyFlags = STANDARD_SCRIPT_VERIFY_FLAGS; |
| 1072 | |
| 1073 | // Temporarily add additional script flags based on the activation of |
| 1074 | // Dynamic Federations. This can be included in the |
| 1075 | // STANDARD_LOCKTIME_VERIFY_FLAGS in a release post-activation. |
| 1076 | if (DeploymentActiveAfter(m_active_chainstate.m_chain.Tip(), args.m_chainparams.GetConsensus(), Consensus::DEPLOYMENT_DYNA_FED)) { |
| 1077 | scriptVerifyFlags |= SCRIPT_SIGHASH_RANGEPROOF; |
| 1078 | } |
| 1079 | |
| 1080 | // Check input scripts and signatures. |
| 1081 | // This is done last to help prevent CPU exhaustion denial-of-service attacks. |
| 1082 | if (!CheckInputScripts(tx, state, m_view, scriptVerifyFlags, true, false, ws.m_precomputed_txdata)) { |
| 1083 | // Detect a failure due to a missing witness so that p2p code can handle rejection caching appropriately. |
| 1084 | if (!tx.HasWitness() && SpendsNonAnchorWitnessProg(tx, m_view)) { |
| 1085 | state.Invalid(TxValidationResult::TX_WITNESS_STRIPPED, |
| 1086 | state.GetRejectReason(), state.GetDebugMessage()); |
| 1087 | } |
| 1088 | return false; // state filled in by CheckInputScripts |
| 1089 | } |
| 1090 | |
| 1091 | return true; |
| 1092 | } |
| 1093 | |
| 1094 | bool MemPoolAccept::ConsensusScriptChecks(const ATMPArgs& args, Workspace& ws) |
| 1095 | { |
nothing calls this directly
no test coverage detected