From 080dfb3a9f1403982b15093d42cb7e076be5590d Mon Sep 17 00:00:00 2001 From: Christopher Jeffrey Date: Fri, 6 May 2016 22:48:51 -0700 Subject: [PATCH] minor. --- lib/bcoin/script.js | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/lib/bcoin/script.js b/lib/bcoin/script.js index d2b3efa9..f46bd7ba 100644 --- a/lib/bcoin/script.js +++ b/lib/bcoin/script.js @@ -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;