diff --git a/lib/script/interpreter.js b/lib/script/interpreter.js index 4185994e4..cebe3b1ff 100644 --- a/lib/script/interpreter.js +++ b/lib/script/interpreter.js @@ -176,7 +176,7 @@ Interpreter.prototype.verify = function (scriptSig, scriptPubkey, tx, nin, flags throw new Error('internal error - CLEANSTACK without P2SH') } - if (stackCopy.length !== 1) { + if (this.stack.length !== 1) { this.errstr = 'SCRIPT_ERR_CLEANSTACK' return false }