Skip to content

Commit af57766

Browse files
committed
Fix misleading error message: Clean stack rule
Error messages in cleanstack is misleading as it lets the user believe that there are extra elements on stack which is incorrect if the stack is empty.
1 parent 1b313ca commit af57766

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/script/script_error.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ std::string ScriptErrorString(const ScriptError serror)
7676
case SCRIPT_ERR_PUBKEYTYPE:
7777
return "Public key is neither compressed or uncompressed";
7878
case SCRIPT_ERR_CLEANSTACK:
79-
return "Extra items left on stack after execution";
79+
return "Stack size must be exactly one after execution";
8080
case SCRIPT_ERR_WITNESS_PROGRAM_WRONG_LENGTH:
8181
return "Witness program has incorrect length";
8282
case SCRIPT_ERR_WITNESS_PROGRAM_WITNESS_EMPTY:

0 commit comments

Comments
 (0)