diff --git a/lib/bcoin/tx.js b/lib/bcoin/tx.js index 7274944b..108b7477 100644 --- a/lib/bcoin/tx.js +++ b/lib/bcoin/tx.js @@ -437,6 +437,9 @@ TX.prototype.verify = function verify(index, force) { if (!res) return false; + // Might be necessary for arithmetic: + // if (stack.length === 0 || new bn(stack.pop()).cmp(0) !== 0) + if (stack.length === 0 || !utils.isEqual(stack.pop(), [ 1 ])) return false;