do not throw on empty stack.

This commit is contained in:
Christopher Jeffrey 2016-01-13 20:20:18 -08:00
parent 018d534c47
commit f8ec64d46f

View File

@ -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();