From 47eb4846572f75ca466ef391cd1aa20570100822 Mon Sep 17 00:00:00 2001 From: Christopher Jeffrey Date: Thu, 24 Aug 2017 23:13:31 -0700 Subject: [PATCH] script: include opcode and instruction pointer in stack size errors. --- lib/script/script.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/script/script.js b/lib/script/script.js index 434fc4f5..a8cb52e6 100644 --- a/lib/script/script.js +++ b/lib/script/script.js @@ -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)