Skip to content

Commit

Permalink
Merge bitcoin#11418: Add error string for CLEANSTACK script violation
Browse files Browse the repository at this point in the history
cee28fb Add error string for CLEANSTACK script violation, preventing an "unknown error" if the CLEANSTACK error condition is set. (Mark Friedenbach)

Pull request description:

  This prevents an unhelpful "unknown error" from being printed in test logs if the CLEANSTACK error condition is set.

Tree-SHA512: cd6764e930184aef3d662e40c67f2ea8aea8552a26d33a567d0315a19d707a82aa2afad9f48ecbb731aa5b77fbbfbd7a6a3a989fdb1424a1181350052ff2a9b5
  • Loading branch information
sipa authored and PastaPastaPasta committed Jan 12, 2020
1 parent 58c58e1 commit 5d655ff
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/script/script_error.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,8 @@ const char* ScriptErrorString(const ScriptError serror)
return "NOPx reserved for soft-fork upgrades";
case SCRIPT_ERR_PUBKEYTYPE:
return "Public key is neither compressed or uncompressed";
case SCRIPT_ERR_CLEANSTACK:
return "Extra items left on stack after execution";
case SCRIPT_ERR_UNKNOWN_ERROR:
case SCRIPT_ERR_ERROR_COUNT:
default: break;
Expand Down

0 comments on commit 5d655ff

Please sign in to comment.