MCPcopy Create free account
hub / github.com/bitcoinxt/bitcoinxt / CleanupScriptCode

Function CleanupScriptCode

src/script/interpreter.cpp:182–191  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

180}
181
182static void CleanupScriptCode(CScript &scriptCode,
183 const std::vector<unsigned char> &vchSig,
184 uint32_t flags) {
185 // Drop the signature in scripts when SIGHASH_FORKID is not used.
186 uint32_t nHashType = GetHashType(vchSig);
187 if (!(flags & SCRIPT_ENABLE_SIGHASH_FORKID) ||
188 !(nHashType & SIGHASH_FORKID)) {
189 scriptCode.FindAndDelete(CScript(vchSig));
190 }
191}
192
193static bool IsDefinedHashtypeSignature(const valtype &vchSig) {
194 if (vchSig.size() == 0) {

Callers 1

EvalScriptFunction · 0.85

Calls 3

GetHashTypeFunction · 0.85
FindAndDeleteMethod · 0.80
CScriptClass · 0.70

Tested by

no test coverage detected