script: include opcode and instruction pointer in stack size errors.

This commit is contained in:
Christopher Jeffrey 2017-08-24 23:13:31 -07:00
parent 13892b3b38
commit 47eb484657
No known key found for this signature in database
GPG Key ID: 8962AB9DE6666BBD

View File

@ -599,7 +599,7 @@ Script.prototype.execute = function execute(stack, flags, tx, index, value, vers
stack.push(op.data);
if (stack.length + alt.length > consensus.MAX_SCRIPT_STACK)
throw new ScriptError('STACK_SIZE');
throw new ScriptError('STACK_SIZE', op, ip);
continue;
}
@ -1308,7 +1308,7 @@ Script.prototype.execute = function execute(stack, flags, tx, index, value, vers
}
if (stack.length + alt.length > consensus.MAX_SCRIPT_STACK)
throw new ScriptError('STACK_SIZE');
throw new ScriptError('STACK_SIZE', op, ip);
}
if (state.length !== 0)