Changeset View
Changeset View
Standalone View
Standalone View
src/script/interpreter.cpp
Show First 20 Lines • Show All 70 Lines • ▼ Show 20 Lines | |||||
} | } | ||||
static void CleanupScriptCode(CScript &scriptCode, | static void CleanupScriptCode(CScript &scriptCode, | ||||
const std::vector<uint8_t> &vchSig, | const std::vector<uint8_t> &vchSig, | ||||
uint32_t flags) { | uint32_t flags) { | ||||
// Drop the signature in scripts when SIGHASH_FORKID is not used. | // Drop the signature in scripts when SIGHASH_FORKID is not used. | ||||
SigHashType sigHashType = GetHashType(vchSig); | SigHashType sigHashType = GetHashType(vchSig); | ||||
if (!(flags & SCRIPT_ENABLE_SIGHASH_FORKID) || !sigHashType.hasForkId()) { | if (!(flags & SCRIPT_ENABLE_SIGHASH_FORKID) || !sigHashType.hasForkId()) { | ||||
FindAndDelete(scriptCode, CScript(vchSig)); | FindAndDelete(scriptCode, CScript() << vchSig); | ||||
} | } | ||||
} | } | ||||
static bool IsOpcodeDisabled(opcodetype opcode, uint32_t flags) { | static bool IsOpcodeDisabled(opcodetype opcode, uint32_t flags) { | ||||
switch (opcode) { | switch (opcode) { | ||||
case OP_INVERT: | case OP_INVERT: | ||||
case OP_2MUL: | case OP_2MUL: | ||||
case OP_2DIV: | case OP_2DIV: | ||||
▲ Show 20 Lines • Show All 1,731 Lines • Show Last 20 Lines |