diff --git a/lib/script/script.js b/lib/script/script.js index db4067db..74e16a14 100644 --- a/lib/script/script.js +++ b/lib/script/script.js @@ -986,14 +986,14 @@ Script.prototype.execute = function execute(stack, flags, tx, index, version) { res = Script.checksig(hash, sig, key, flags); } - stack.pop(); - stack.pop(); - if (!res && (flags & constants.flags.VERIFY_NULLFAIL)) { if (sig.length !== 0) throw new ScriptError('NULLFAIL', op, ip); } + stack.pop(); + stack.pop(); + stack.push(res ? STACK_TRUE : STACK_FALSE); if (op === opcodes.OP_CHECKSIGVERIFY) {