diff --git a/lib/bcoin/script.js b/lib/bcoin/script.js index e9f5ac24..506fc904 100644 --- a/lib/bcoin/script.js +++ b/lib/bcoin/script.js @@ -180,8 +180,9 @@ script.verify = function verify(input, output, tx, i, flags) { // Reset the stack stack = copy; - // Stack should _never_ be empty at this point - assert(stack.length !== 0); + // Stack should not be empty at this point + if (stack.length === 0) + return false; // Grab the real redeem script redeem = stack.pop();