Raven Core  3.0.0
P2P Digital Currency
script_error.cpp
Go to the documentation of this file.
1 // Copyright (c) 2009-2010 Satoshi Nakamoto
2 // Copyright (c) 2009-2016 The Bitcoin Core developers
3 // Copyright (c) 2017-2019 The Raven Core developers
4 // Distributed under the MIT software license, see the accompanying
5 // file COPYING or http://www.opensource.org/licenses/mit-license.php.
6 
7 #include "script_error.h"
8 
9 const char* ScriptErrorString(const ScriptError serror)
10 {
11  switch (serror)
12  {
13  case SCRIPT_ERR_OK:
14  return "No error";
16  return "Script evaluated without error but finished with a false/empty top stack element";
17  case SCRIPT_ERR_VERIFY:
18  return "Script failed an OP_VERIFY operation";
20  return "Script failed an OP_EQUALVERIFY operation";
22  return "Script failed an OP_CHECKMULTISIGVERIFY operation";
24  return "Script failed an OP_CHECKSIGVERIFY operation";
26  return "Script failed an OP_NUMEQUALVERIFY operation";
28  return "Script is too big";
30  return "Push value size limit exceeded";
32  return "Operation limit exceeded";
34  return "Stack size limit exceeded";
36  return "Signature count negative or greater than pubkey count";
38  return "Pubkey count negative or limit exceeded";
40  return "Opcode missing or not understood";
42  return "Attempted to use a disabled opcode";
44  return "Operation not valid with the current stack size";
46  return "Operation not valid with the current altstack size";
48  return "OP_RETURN was encountered";
50  return "Invalid OP_IF construction";
52  return "Negative locktime";
54  return "Locktime requirement not satisfied";
56  return "Signature hash type missing or not understood";
57  case SCRIPT_ERR_SIG_DER:
58  return "Non-canonical DER signature";
60  return "Data push larger than necessary";
62  return "Only non-push operators allowed in signatures";
64  return "Non-canonical signature: S value is unnecessarily high";
66  return "Dummy CHECKMULTISIG argument must be zero";
68  return "OP_IF/NOTIF argument must be minimal";
70  return "Signature must be zero for failed CHECK(MULTI)SIG operation";
72  return "NOPx reserved for soft-fork upgrades";
74  return "Witness version reserved for soft-fork upgrades";
76  return "Public key is neither compressed or uncompressed";
78  return "Extra items left on stack after execution";
80  return "Witness program has incorrect length";
82  return "Witness program was passed an empty witness";
84  return "Witness program hash mismatch";
86  return "Witness requires empty scriptSig";
88  return "Witness requires only-redeemscript scriptSig";
90  return "Witness provided for non-witness script";
92  return "Using non-compressed keys in segwit";
95  default: break;
96  }
97  return "unknown error";
98 }
enum ScriptError_t ScriptError
const char * ScriptErrorString(const ScriptError serror)
Definition: script_error.cpp:9