This commit is contained in:
Christopher Jeffrey 2016-05-06 22:48:51 -07:00
parent 7e3635bce6
commit 080dfb3a9f
No known key found for this signature in database
GPG Key ID: 8962AB9DE6666BBD

View File

@ -3977,11 +3977,7 @@ Script.verifyProgram = function verifyProgram(witness, output, flags, tx, i) {
redeem.execute(stack, flags, tx, i, 1);
// Verify the script did not fail as well as the stack values
if (stack.length === 0 || !Script.bool(stack.pop()))
throw new ScriptError('EVAL_FALSE');
// Witnesses always require cleanstack
if (stack.length !== 0)
if (stack.length !== 1 || !Script.bool(stack.pop()))
throw new ScriptError('EVAL_FALSE');
return true;