| 71 | } |
| 72 | |
| 73 | static void CleanupScriptCode(CScript &scriptCode, |
| 74 | const std::vector<uint8_t> &vchSig, |
| 75 | uint32_t flags) { |
| 76 | // Drop the signature in scripts when SIGHASH_FORKID is not used. |
| 77 | SigHashType sigHashType = GetHashType(vchSig); |
| 78 | if (!(flags & SCRIPT_ENABLE_SIGHASH_FORKID) || !sigHashType.hasForkId()) { |
| 79 | FindAndDelete(scriptCode, CScript() << vchSig); |
| 80 | } |
| 81 | } |
| 82 | |
| 83 | static bool IsOpcodeDisabled(opcodetype opcode, uint32_t flags) { |
| 84 | switch (opcode) { |
no test coverage detected