MCPcopy Create free account
hub / github.com/ElementsProject/elements / ScriptErrorString

Function ScriptErrorString

src/script/script_error.cpp:13–190  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

11}
12
13std::string ScriptErrorString(const ScriptError serror)
14{
15 switch (serror)
16 {
17 case SCRIPT_ERR_OK:
18 return "No error";
19 case SCRIPT_ERR_EVAL_FALSE:
20 return "Script evaluated without error but finished with a false/empty top stack element";
21 case SCRIPT_ERR_VERIFY:
22 return "Script failed an OP_VERIFY operation";
23 case SCRIPT_ERR_EQUALVERIFY:
24 return "Script failed an OP_EQUALVERIFY operation";
25 case SCRIPT_ERR_CHECKMULTISIGVERIFY:
26 return "Script failed an OP_CHECKMULTISIGVERIFY operation";
27 case SCRIPT_ERR_CHECKSIGVERIFY:
28 return "Script failed an OP_CHECKSIGVERIFY operation";
29 case SCRIPT_ERR_NUMEQUALVERIFY:
30 return "Script failed an OP_NUMEQUALVERIFY operation";
31 case SCRIPT_ERR_SCRIPT_SIZE:
32 return "Script is too big";
33 case SCRIPT_ERR_PUSH_SIZE:
34 return "Push value size limit exceeded";
35 case SCRIPT_ERR_OP_COUNT:
36 return "Operation limit exceeded";
37 case SCRIPT_ERR_STACK_SIZE:
38 return "Stack size limit exceeded";
39 case SCRIPT_ERR_SIG_COUNT:
40 return "Signature count negative or greater than pubkey count";
41 case SCRIPT_ERR_PUBKEY_COUNT:
42 return "Pubkey count negative or limit exceeded";
43 case SCRIPT_ERR_BAD_OPCODE:
44 return "Opcode missing or not understood";
45 case SCRIPT_ERR_DISABLED_OPCODE:
46 return "Attempted to use a disabled opcode";
47 case SCRIPT_ERR_INVALID_STACK_OPERATION:
48 return "Operation not valid with the current stack size";
49 case SCRIPT_ERR_INVALID_ALTSTACK_OPERATION:
50 return "Operation not valid with the current altstack size";
51 case SCRIPT_ERR_OP_RETURN:
52 return "OP_RETURN was encountered";
53 case SCRIPT_ERR_UNBALANCED_CONDITIONAL:
54 return "Invalid OP_IF construction";
55 case SCRIPT_ERR_NEGATIVE_LOCKTIME:
56 return "Negative locktime";
57 case SCRIPT_ERR_UNSATISFIED_LOCKTIME:
58 return "Locktime requirement not satisfied";
59 case SCRIPT_ERR_SIG_HASHTYPE:
60 return "Signature hash type missing or not understood";
61 case SCRIPT_ERR_SIG_DER:
62 return "Non-canonical DER signature";
63 case SCRIPT_ERR_MINIMALDATA:
64 return "Data push larger than necessary";
65 case SCRIPT_ERR_SIG_PUSHONLY:
66 return "Only push operators allowed in signatures";
67 case SCRIPT_ERR_SIG_HIGH_S:
68 return "Non-canonical signature: S value is unnecessarily high";
69 case SCRIPT_ERR_SIG_NULLDUMMY:
70 return "Dummy CHECKMULTISIG argument must be zero";

Callers 7

CheckInputScriptsFunction · 0.85
SignTransactionFunction · 0.85
BOOST_AUTO_TEST_CASEFunction · 0.85
CheckTxScriptsFunction · 0.85
BOOST_AUTO_TEST_CASEFunction · 0.85
BOOST_AUTO_TEST_CASEFunction · 0.85
FUZZ_TARGET_INITFunction · 0.85

Calls 1

SIMPLICITY_ERR_MSGFunction · 0.85

Tested by 5

BOOST_AUTO_TEST_CASEFunction · 0.68
CheckTxScriptsFunction · 0.68
BOOST_AUTO_TEST_CASEFunction · 0.68
BOOST_AUTO_TEST_CASEFunction · 0.68
FUZZ_TARGET_INITFunction · 0.68