script: fix minimalif.
This commit is contained in:
parent
d4778d21b2
commit
77e1af4faf
@ -367,7 +367,7 @@ Script.prototype.execute = function execute(stack, flags, tx, index, version) {
|
||||
if (stack.length < 1)
|
||||
throw new ScriptError('UNBALANCED_CONDITIONAL', op, ip);
|
||||
|
||||
val = Script.bool(stack.pop());
|
||||
val = stack.pop();
|
||||
|
||||
if (version == 1 && (flags & constants.flags.VERIFY_MINIMALIF)) {
|
||||
if (val.length > 1)
|
||||
@ -377,6 +377,8 @@ Script.prototype.execute = function execute(stack, flags, tx, index, version) {
|
||||
throw new ScriptError('MINIMALIF');
|
||||
}
|
||||
|
||||
val = Script.bool(val);
|
||||
|
||||
if (op === opcodes.OP_NOTIF)
|
||||
val = !val;
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user