From 679526f4451ebe707324556d3cc6b85526658c6e Mon Sep 17 00:00:00 2001 From: Xiaohui Date: Mon, 27 Sep 2021 17:54:27 -0700 Subject: [PATCH] bug fix: stack evaluation returns wrong result --- lib/script/interpreter.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 }