Bitcoin Core  0.19.99
P2P Digital Currency
Go to the documentation of this file.
1 // Copyright (c) 2009-2010 Satoshi Nakamoto
2 // Copyright (c) 2009-2018 The Bitcoin Core developers
3 // Distributed under the MIT software license, see the accompanying
4 // file COPYING or
6 #include <script/script_error.h>
8 const char* ScriptErrorString(const ScriptError serror)
9 {
10  switch (serror)
11  {
12  case SCRIPT_ERR_OK:
13  return "No error";
15  return "Script evaluated without error but finished with a false/empty top stack element";
17  return "Script failed an OP_VERIFY operation";
19  return "Script failed an OP_EQUALVERIFY operation";
21  return "Script failed an OP_CHECKMULTISIGVERIFY operation";
23  return "Script failed an OP_CHECKSIGVERIFY operation";
25  return "Script failed an OP_NUMEQUALVERIFY operation";
27  return "Script is too big";
29  return "Push value size limit exceeded";
31  return "Operation limit exceeded";
33  return "Stack size limit exceeded";
35  return "Signature count negative or greater than pubkey count";
37  return "Pubkey count negative or limit exceeded";
39  return "Opcode missing or not understood";
41  return "Attempted to use a disabled opcode";
43  return "Operation not valid with the current stack size";
45  return "Operation not valid with the current altstack size";
47  return "OP_RETURN was encountered";
49  return "Invalid OP_IF construction";
51  return "Negative locktime";
53  return "Locktime requirement not satisfied";
55  return "Signature hash type missing or not understood";
57  return "Non-canonical DER signature";
59  return "Data push larger than necessary";
61  return "Only push operators allowed in signatures";
63  return "Non-canonical signature: S value is unnecessarily high";
65  return "Dummy CHECKMULTISIG argument must be zero";
67  return "OP_IF/NOTIF argument must be minimal";
69  return "Signature must be zero for failed CHECK(MULTI)SIG operation";
71  return "NOPx reserved for soft-fork upgrades";
73  return "Witness version reserved for soft-fork upgrades";
75  return "Public key is neither compressed or uncompressed";
77  return "Extra items left on stack after execution";
79  return "Witness program has incorrect length";
81  return "Witness program was passed an empty witness";
83  return "Witness program hash mismatch";
85  return "Witness requires empty scriptSig";
87  return "Witness requires only-redeemscript scriptSig";
89  return "Witness provided for non-witness script";
91  return "Using non-compressed keys in segwit";
93  return "Using OP_CODESEPARATOR in non-witness script";
95  return "Signature is found in scriptCode";
98  default: break;
99  }
100  return "unknown error";
101 }
enum ScriptError_t ScriptError
const char * ScriptErrorString(const ScriptError serror)
Definition: script_error.cpp:8