script: nullfail - minor.

This commit is contained in:
Christopher Jeffrey 2016-10-03 14:16:07 -07:00
parent ba8a1272bf
commit b36491dd53
No known key found for this signature in database
GPG Key ID: 8962AB9DE6666BBD

View File

@ -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) {