Skip to content

Commit 4f5ae52

Browse files
committed
Merge bitcoin#20006: Fix misleading error message: Clean stack rule
af57766 Fix misleading error message: Clean stack rule (sanket1729) Pull request description: Error messages in clean stack is misleading as it lets the user believe that there are extra elements on the stack which is incorrect if the stack is empty. Let me know if this requires additional test. ACKs for top commit: instagibbs: re-ACK bitcoin@af57766 gzhao408: reACK bitcoin@af57766 theStack: re-ACK af57766 darosior: re ACK af57766 Tree-SHA512: 88e77416e220b080246fec368f5552a891d102d072b7bee62ac560d5e31c4a8c2ee9cbe569740b253e9df177d21dc788d10d856b2a542ab47761bb81698e4082
2 parents 5c435c7 + af57766 commit 4f5ae52

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)