Changeset View
Changeset View
Standalone View
Standalone View
src/script/interpreter.cpp
Show First 20 Lines • Show All 1,101 Lines • ▼ Show 20 Lines | try { | ||||
if ((checkBits >> iKey) != 0) { | if ((checkBits >> iKey) != 0) { | ||||
// This is a sanity check and should be | // This is a sanity check and should be | ||||
// unrecheable. | // unrecheable. | ||||
return set_error( | return set_error( | ||||
serror, ScriptError::INVALID_BIT_COUNT); | serror, ScriptError::INVALID_BIT_COUNT); | ||||
} | } | ||||
} else { | } else { | ||||
// LEGACY MULTISIG (ECDSA / NULL) | // LEGACY MULTISIG (ECDSA / NULL) | ||||
// A bug causes CHECKMULTISIG to consume one extra | |||||
// argument whose contents were not checked in any | |||||
// way. | |||||
// | |||||
// Unfortunately this is a potential source of | |||||
// mutability, so optionally verify it is exactly | |||||
// equal to zero. | |||||
if ((flags & SCRIPT_VERIFY_NULLDUMMY) && | |||||
stacktop(-idxDummy).size()) { | |||||
return set_error(serror, | |||||
ScriptError::SIG_NULLDUMMY); | |||||
} | |||||
// Remove signature for pre-fork scripts | // Remove signature for pre-fork scripts | ||||
for (int k = 0; k < nSigsCount; k++) { | for (int k = 0; k < nSigsCount; k++) { | ||||
valtype &vchSig = stacktop(-idxTopSig - k); | valtype &vchSig = stacktop(-idxTopSig - k); | ||||
CleanupScriptCode(scriptCode, vchSig, flags); | CleanupScriptCode(scriptCode, vchSig, flags); | ||||
} | } | ||||
int nSigsRemaining = nSigsCount; | int nSigsRemaining = nSigsCount; | ||||
▲ Show 20 Lines • Show All 655 Lines • Show Last 20 Lines |