Raven Core
3.0.0
P2P Digital Currency
src
script
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"
;
15
case
SCRIPT_ERR_EVAL_FALSE
:
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"
;
19
case
SCRIPT_ERR_EQUALVERIFY
:
20
return
"Script failed an OP_EQUALVERIFY operation"
;
21
case
SCRIPT_ERR_CHECKMULTISIGVERIFY
:
22
return
"Script failed an OP_CHECKMULTISIGVERIFY operation"
;
23
case
SCRIPT_ERR_CHECKSIGVERIFY
:
24
return
"Script failed an OP_CHECKSIGVERIFY operation"
;
25
case
SCRIPT_ERR_NUMEQUALVERIFY
:
26
return
"Script failed an OP_NUMEQUALVERIFY operation"
;
27
case
SCRIPT_ERR_SCRIPT_SIZE
:
28
return
"Script is too big"
;
29
case
SCRIPT_ERR_PUSH_SIZE
:
30
return
"Push value size limit exceeded"
;
31
case
SCRIPT_ERR_OP_COUNT
:
32
return
"Operation limit exceeded"
;
33
case
SCRIPT_ERR_STACK_SIZE
:
34
return
"Stack size limit exceeded"
;
35
case
SCRIPT_ERR_SIG_COUNT
:
36
return
"Signature count negative or greater than pubkey count"
;
37
case
SCRIPT_ERR_PUBKEY_COUNT
:
38
return
"Pubkey count negative or limit exceeded"
;
39
case
SCRIPT_ERR_BAD_OPCODE
:
40
return
"Opcode missing or not understood"
;
41
case
SCRIPT_ERR_DISABLED_OPCODE
:
42
return
"Attempted to use a disabled opcode"
;
43
case
SCRIPT_ERR_INVALID_STACK_OPERATION
:
44
return
"Operation not valid with the current stack size"
;
45
case
SCRIPT_ERR_INVALID_ALTSTACK_OPERATION
:
46
return
"Operation not valid with the current altstack size"
;
47
case
SCRIPT_ERR_OP_RETURN
:
48
return
"OP_RETURN was encountered"
;
49
case
SCRIPT_ERR_UNBALANCED_CONDITIONAL
:
50
return
"Invalid OP_IF construction"
;
51
case
SCRIPT_ERR_NEGATIVE_LOCKTIME
:
52
return
"Negative locktime"
;
53
case
SCRIPT_ERR_UNSATISFIED_LOCKTIME
:
54
return
"Locktime requirement not satisfied"
;
55
case
SCRIPT_ERR_SIG_HASHTYPE
:
56
return
"Signature hash type missing or not understood"
;
57
case
SCRIPT_ERR_SIG_DER
:
58
return
"Non-canonical DER signature"
;
59
case
SCRIPT_ERR_MINIMALDATA
:
60
return
"Data push larger than necessary"
;
61
case
SCRIPT_ERR_SIG_PUSHONLY
:
62
return
"Only non-push operators allowed in signatures"
;
63
case
SCRIPT_ERR_SIG_HIGH_S
:
64
return
"Non-canonical signature: S value is unnecessarily high"
;
65
case
SCRIPT_ERR_SIG_NULLDUMMY
:
66
return
"Dummy CHECKMULTISIG argument must be zero"
;
67
case
SCRIPT_ERR_MINIMALIF
:
68
return
"OP_IF/NOTIF argument must be minimal"
;
69
case
SCRIPT_ERR_SIG_NULLFAIL
:
70
return
"Signature must be zero for failed CHECK(MULTI)SIG operation"
;
71
case
SCRIPT_ERR_DISCOURAGE_UPGRADABLE_NOPS
:
72
return
"NOPx reserved for soft-fork upgrades"
;
73
case
SCRIPT_ERR_DISCOURAGE_UPGRADABLE_WITNESS_PROGRAM
:
74
return
"Witness version reserved for soft-fork upgrades"
;
75
case
SCRIPT_ERR_PUBKEYTYPE
:
76
return
"Public key is neither compressed or uncompressed"
;
77
case
SCRIPT_ERR_CLEANSTACK
:
78
return
"Extra items left on stack after execution"
;
79
case
SCRIPT_ERR_WITNESS_PROGRAM_WRONG_LENGTH
:
80
return
"Witness program has incorrect length"
;
81
case
SCRIPT_ERR_WITNESS_PROGRAM_WITNESS_EMPTY
:
82
return
"Witness program was passed an empty witness"
;
83
case
SCRIPT_ERR_WITNESS_PROGRAM_MISMATCH
:
84
return
"Witness program hash mismatch"
;
85
case
SCRIPT_ERR_WITNESS_MALLEATED
:
86
return
"Witness requires empty scriptSig"
;
87
case
SCRIPT_ERR_WITNESS_MALLEATED_P2SH
:
88
return
"Witness requires only-redeemscript scriptSig"
;
89
case
SCRIPT_ERR_WITNESS_UNEXPECTED
:
90
return
"Witness provided for non-witness script"
;
91
case
SCRIPT_ERR_WITNESS_PUBKEYTYPE
:
92
return
"Using non-compressed keys in segwit"
;
93
case
SCRIPT_ERR_UNKNOWN_ERROR
:
94
case
SCRIPT_ERR_ERROR_COUNT
:
95
default
:
break
;
96
}
97
return
"unknown error"
;
98
}
SCRIPT_ERR_STACK_SIZE
Definition:
script_error.h:21
SCRIPT_ERR_SIG_PUSHONLY
Definition:
script_error.h:47
SCRIPT_ERR_WITNESS_PROGRAM_WRONG_LENGTH
Definition:
script_error.h:60
SCRIPT_ERR_CLEANSTACK
Definition:
script_error.h:51
SCRIPT_ERR_VERIFY
Definition:
script_error.h:26
SCRIPT_ERR_INVALID_STACK_OPERATION
Definition:
script_error.h:35
ScriptError
enum ScriptError_t ScriptError
SCRIPT_ERR_DISCOURAGE_UPGRADABLE_NOPS
Definition:
script_error.h:56
SCRIPT_ERR_UNKNOWN_ERROR
Definition:
script_error.h:13
SCRIPT_ERR_SIG_NULLFAIL
Definition:
script_error.h:53
SCRIPT_ERR_SIG_COUNT
Definition:
script_error.h:22
SCRIPT_ERR_SIG_HIGH_S
Definition:
script_error.h:48
SCRIPT_ERR_NUMEQUALVERIFY
Definition:
script_error.h:30
SCRIPT_ERR_UNSATISFIED_LOCKTIME
Definition:
script_error.h:41
SCRIPT_ERR_SCRIPT_SIZE
Definition:
script_error.h:18
SCRIPT_ERR_DISABLED_OPCODE
Definition:
script_error.h:34
SCRIPT_ERR_DISCOURAGE_UPGRADABLE_WITNESS_PROGRAM
Definition:
script_error.h:57
SCRIPT_ERR_ERROR_COUNT
Definition:
script_error.h:68
SCRIPT_ERR_WITNESS_MALLEATED
Definition:
script_error.h:63
SCRIPT_ERR_SIG_HASHTYPE
Definition:
script_error.h:44
SCRIPT_ERR_OP_COUNT
Definition:
script_error.h:20
ScriptErrorString
const char * ScriptErrorString(const ScriptError serror)
Definition:
script_error.cpp:9
SCRIPT_ERR_OK
Definition:
script_error.h:12
SCRIPT_ERR_WITNESS_PROGRAM_MISMATCH
Definition:
script_error.h:62
SCRIPT_ERR_CHECKSIGVERIFY
Definition:
script_error.h:29
SCRIPT_ERR_WITNESS_PUBKEYTYPE
Definition:
script_error.h:66
SCRIPT_ERR_PUBKEY_COUNT
Definition:
script_error.h:23
SCRIPT_ERR_EVAL_FALSE
Definition:
script_error.h:14
SCRIPT_ERR_PUBKEYTYPE
Definition:
script_error.h:50
SCRIPT_ERR_BAD_OPCODE
Definition:
script_error.h:33
SCRIPT_ERR_MINIMALDATA
Definition:
script_error.h:46
SCRIPT_ERR_WITNESS_MALLEATED_P2SH
Definition:
script_error.h:64
script_error.h
SCRIPT_ERR_EQUALVERIFY
Definition:
script_error.h:27
SCRIPT_ERR_OP_RETURN
Definition:
script_error.h:15
SCRIPT_ERR_INVALID_ALTSTACK_OPERATION
Definition:
script_error.h:36
SCRIPT_ERR_NEGATIVE_LOCKTIME
Definition:
script_error.h:40
SCRIPT_ERR_CHECKMULTISIGVERIFY
Definition:
script_error.h:28
SCRIPT_ERR_SIG_DER
Definition:
script_error.h:45
SCRIPT_ERR_PUSH_SIZE
Definition:
script_error.h:19
SCRIPT_ERR_WITNESS_PROGRAM_WITNESS_EMPTY
Definition:
script_error.h:61
SCRIPT_ERR_WITNESS_UNEXPECTED
Definition:
script_error.h:65
SCRIPT_ERR_SIG_NULLDUMMY
Definition:
script_error.h:49
SCRIPT_ERR_MINIMALIF
Definition:
script_error.h:52
SCRIPT_ERR_UNBALANCED_CONDITIONAL
Definition:
script_error.h:37
Generated on Mon Jul 29 2019 02:32:20 for Raven Core by
1.8.13