Changeset View
Changeset View
Standalone View
Standalone View
src/script/interpreter.cpp
Show First 20 Lines • Show All 1,775 Lines • ▼ Show 20 Lines | if (!segwit_exempt && (flags & SCRIPT_VERIFY_CLEANSTACK)) { | ||||
// CLEANSTACK->P2SH+CLEANSTACK would be possible, which is not a | // CLEANSTACK->P2SH+CLEANSTACK would be possible, which is not a | ||||
// softfork (and P2SH should be one). | // softfork (and P2SH should be one). | ||||
assert((flags & SCRIPT_VERIFY_P2SH) != 0); | assert((flags & SCRIPT_VERIFY_P2SH) != 0); | ||||
if (stack.size() != 1) { | if (stack.size() != 1) { | ||||
return set_error(serror, ScriptError::CLEANSTACK); | return set_error(serror, ScriptError::CLEANSTACK); | ||||
} | } | ||||
} | } | ||||
if (!segwit_exempt && (flags & SCRIPT_VERIFY_INPUT_SIGCHECKS)) { | if (flags & SCRIPT_VERIFY_INPUT_SIGCHECKS) { | ||||
// This limit is intended for standard use, and is based on an | // This limit is intended for standard use, and is based on an | ||||
// examination of typical and historical standard uses. | // examination of typical and historical standard uses. | ||||
// - allowing P2SH ECDSA multisig with compressed keys, which at an | // - allowing P2SH ECDSA multisig with compressed keys, which at an | ||||
// extreme (1-of-15) may have 15 SigChecks in ~590 bytes of scriptSig. | // extreme (1-of-15) may have 15 SigChecks in ~590 bytes of scriptSig. | ||||
// - allowing Bare ECDSA multisig, which at an extreme (1-of-3) may have | // - allowing Bare ECDSA multisig, which at an extreme (1-of-3) may have | ||||
// 3 sigchecks in ~72 bytes of scriptSig. | // 3 sigchecks in ~72 bytes of scriptSig. | ||||
// - Since the size of an input is 41 bytes + length of scriptSig, then | // - Since the size of an input is 41 bytes + length of scriptSig, then | ||||
// the most dense possible inputs satisfying this rule would be: | // the most dense possible inputs satisfying this rule would be: | ||||
Show All 24 Lines |