MCPcopy Create free account
hub / github.com/Bitcoin-ABC/bitcoin-abc / CleanupScriptCode

Function CleanupScriptCode

src/script/interpreter.cpp:73–81  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

71}
72
73static 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
83static bool IsOpcodeDisabled(opcodetype opcode, uint32_t flags) {
84 switch (opcode) {

Callers 2

EvalChecksigFunction · 0.85
RunNextOpInnerMethod · 0.85

Calls 4

GetHashTypeFunction · 0.85
hasForkIdMethod · 0.80
FindAndDeleteFunction · 0.70
CScriptClass · 0.70

Tested by

no test coverage detected