Skip to main content

cita_cloud_proto/proto/
status_code.rs

1// This file is @generated by prost-build.
2#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
3#[repr(i32)]
4pub enum StatusCodeEnum {
5    /// / Success: 0
6    Success = 0,
7    /// / Convert int to status Error
8    ConvertIntError = 1,
9    /// / status code is none
10    NoneStatusCode = 2,
11    /// / fate error
12    FatalError = 3,
13    /// / controller error; start from 100
14    /// / node in misbehave list
15    MisbehaveNode = 100,
16    /// / node in ban list
17    BannedNode = 101,
18    /// / address not consistent with record origin
19    AddressOriginCheckError = 102,
20    /// / provide address len is not 20
21    ProvideAddressError = 103,
22    /// / message not provide address
23    NoProvideAddress = 104,
24    /// / not get the block
25    NoBlock = 105,
26    /// / not get the proof
27    NoProof = 106,
28    /// / not get height of block which wrap tx
29    NoTxHeight = 107,
30    /// / not get tx index
31    NoTxIndex = 108,
32    /// / not get transaction
33    NoTransaction = 109,
34    /// / not get the block height base on hash
35    NoBlockHeight = 110,
36    /// / not get the block hash base on height
37    NoBlockHash = 111,
38    /// / proposal is none
39    NoneProposal = 112,
40    /// / block body is none
41    NoneBlockBody = 113,
42    /// / block header is none
43    NoneBlockHeader = 114,
44    /// / chain status is none
45    NoneChainStatus = 115,
46    /// / transaction's witness is none
47    NoneWitness = 116,
48    /// / transaction is none
49    NoneTransaction = 117,
50    /// / utxo is none
51    NoneUtxo = 118,
52    /// / raw tx is none
53    NoneRawTx = 119,
54    /// / early status received
55    EarlyStatus = 120,
56    /// / execute error
57    ExecuteError = 121,
58    /// / proto struct encode error
59    EncodeError = 122,
60    /// / proto struct encode error
61    DecodeError = 123,
62    /// / no candidate block
63    NoCandidate = 124,
64    /// / not get early status
65    NoEarlyStatus = 125,
66    /// / fork tree no block
67    NoForkTree = 126,
68    /// / find dup transaction
69    DupTransaction = 127,
70    /// / proposal too high
71    ProposalTooHigh = 128,
72    /// / proposal too low
73    ProposalTooLow = 129,
74    /// / proposal check error
75    ProposalCheckError = 130,
76    /// / consensus check proposal error
77    ConsensusProposalCheckError = 131,
78    /// / block hash check error
79    BlockCheckError = 132,
80    /// / the sig of chain status init check error
81    CsiSigCheckError = 133,
82    /// / chain version or chain id check error
83    VersionOrIdCheckError = 134,
84    /// / hash check error
85    HashCheckError = 135,
86    /// / hash len is not correct
87    HashLenError = 136,
88    /// / signature len is not correct
89    SigLenError = 137,
90    /// / signature check error
91    SigCheckError = 138,
92    /// / the node in sync mode
93    NodeInSyncMode = 139,
94    /// / Dup tx in history
95    HistoryDupTx = 140,
96    /// / emergency brake
97    EmergencyBrake = 141,
98    /// / auth check tx's version error
99    InvalidVersion = 142,
100    /// / auth check tx's to error
101    InvalidTo = 143,
102    /// / auth check tx's nonce error
103    InvalidNonce = 144,
104    /// / auth check tx's valid until block error
105    InvalidValidUntilBlock = 145,
106    /// / auth check tx's value error
107    InvalidValue = 146,
108    /// / auth check tx's chain id error
109    InvalidChainId = 147,
110    /// / auth limit utxo's witness only one
111    InvalidWitness = 148,
112    /// / auth check utxo's lock id error
113    InvalidLockId = 149,
114    /// / auth check utxo's pre tx hash error
115    InvalidPreHash = 150,
116    /// / auth check send is not admin
117    AdminCheckError = 151,
118    /// / network msg's module not controller
119    ModuleNotController = 152,
120    /// / the quota use of tx has exceeded quota-limit
121    QuotaUsedExceed = 153,
122    /// / not get the state_root
123    NoStateRoot = 154,
124    /// / block state_root check error
125    StateRootCheckError = 155,
126    /// / update system-config error; wrong prehash or unallowed lockid
127    UpdateSystemConfigError = 156,
128    /// / not get the receipt proof
129    NoReceiptProof = 157,
130    /// / Consensus from 200
131    /// / check proposal proof error
132    ConsensusServerNotReady = 200,
133    /// / proof of proposal error
134    ProposalProofError = 201,
135    /// / Crypto from 300
136    /// / Crypto server not ready
137    CryptoServerNotReady = 300,
138    /// / hash result is none
139    NoneHashResult = 301,
140    /// / construct signature error
141    ConstructSigError = 302,
142    /// / construct key pair error
143    ConstructKeyPairError = 303,
144    /// / sign error
145    SignError = 304,
146    /// / Network from 400
147    /// / Network server not ready
148    NetworkServerNotReady = 400,
149    /// / send message error
150    SendMsgError = 401,
151    /// / broadcast message error
152    BroadcastMsgError = 402,
153    /// / multi-addr error
154    MultiAddrParseError = 403,
155    /// / dial node failed
156    DialNodeFail = 404,
157    /// add an existed peer
158    AddExistedPeer = 405,
159    /// / executor from 500
160    /// / Executor server not ready
161    ExecuteServerNotReady = 500,
162    /// / internal channel disconnected
163    InternalChannelDisconnected = 501,
164    /// / early same block reenter
165    ReenterBlock = 502,
166    /// / invalid block reenter
167    ReenterInvalidBlock = 503,
168    /// / storage from 600
169    /// / storage server not ready
170    StorageServerNotReady = 600,
171    /// / kv not found
172    NotFound = 601,
173    /// / invalid region
174    InvalidRegion = 602,
175    /// / invalid key
176    InvalidKey = 603,
177    /// / bad region
178    BadRegion = 604,
179    /// / store data error
180    StoreError = 605,
181    /// / load data error
182    LoadError = 606,
183    /// / delete data error
184    DeleteError = 607,
185}
186impl StatusCodeEnum {
187    /// String value of the enum field names used in the ProtoBuf definition.
188    ///
189    /// The values are not transformed in any way and thus are considered stable
190    /// (if the ProtoBuf definition does not change) and safe for programmatic use.
191    pub fn as_str_name(&self) -> &'static str {
192        match self {
193            Self::Success => "Success",
194            Self::ConvertIntError => "ConvertIntError",
195            Self::NoneStatusCode => "NoneStatusCode",
196            Self::FatalError => "FatalError",
197            Self::MisbehaveNode => "MisbehaveNode",
198            Self::BannedNode => "BannedNode",
199            Self::AddressOriginCheckError => "AddressOriginCheckError",
200            Self::ProvideAddressError => "ProvideAddressError",
201            Self::NoProvideAddress => "NoProvideAddress",
202            Self::NoBlock => "NoBlock",
203            Self::NoProof => "NoProof",
204            Self::NoTxHeight => "NoTxHeight",
205            Self::NoTxIndex => "NoTxIndex",
206            Self::NoTransaction => "NoTransaction",
207            Self::NoBlockHeight => "NoBlockHeight",
208            Self::NoBlockHash => "NoBlockHash",
209            Self::NoneProposal => "NoneProposal",
210            Self::NoneBlockBody => "NoneBlockBody",
211            Self::NoneBlockHeader => "NoneBlockHeader",
212            Self::NoneChainStatus => "NoneChainStatus",
213            Self::NoneWitness => "NoneWitness",
214            Self::NoneTransaction => "NoneTransaction",
215            Self::NoneUtxo => "NoneUtxo",
216            Self::NoneRawTx => "NoneRawTx",
217            Self::EarlyStatus => "EarlyStatus",
218            Self::ExecuteError => "ExecuteError",
219            Self::EncodeError => "EncodeError",
220            Self::DecodeError => "DecodeError",
221            Self::NoCandidate => "NoCandidate",
222            Self::NoEarlyStatus => "NoEarlyStatus",
223            Self::NoForkTree => "NoForkTree",
224            Self::DupTransaction => "DupTransaction",
225            Self::ProposalTooHigh => "ProposalTooHigh",
226            Self::ProposalTooLow => "ProposalTooLow",
227            Self::ProposalCheckError => "ProposalCheckError",
228            Self::ConsensusProposalCheckError => "ConsensusProposalCheckError",
229            Self::BlockCheckError => "BlockCheckError",
230            Self::CsiSigCheckError => "CSISigCheckError",
231            Self::VersionOrIdCheckError => "VersionOrIdCheckError",
232            Self::HashCheckError => "HashCheckError",
233            Self::HashLenError => "HashLenError",
234            Self::SigLenError => "SigLenError",
235            Self::SigCheckError => "SigCheckError",
236            Self::NodeInSyncMode => "NodeInSyncMode",
237            Self::HistoryDupTx => "HistoryDupTx",
238            Self::EmergencyBrake => "EmergencyBrake",
239            Self::InvalidVersion => "InvalidVersion",
240            Self::InvalidTo => "InvalidTo",
241            Self::InvalidNonce => "InvalidNonce",
242            Self::InvalidValidUntilBlock => "InvalidValidUntilBlock",
243            Self::InvalidValue => "InvalidValue",
244            Self::InvalidChainId => "InvalidChainId",
245            Self::InvalidWitness => "InvalidWitness",
246            Self::InvalidLockId => "InvalidLockId",
247            Self::InvalidPreHash => "InvalidPreHash",
248            Self::AdminCheckError => "AdminCheckError",
249            Self::ModuleNotController => "ModuleNotController",
250            Self::QuotaUsedExceed => "QuotaUsedExceed",
251            Self::NoStateRoot => "NoStateRoot",
252            Self::StateRootCheckError => "StateRootCheckError",
253            Self::UpdateSystemConfigError => "UpdateSystemConfigError",
254            Self::NoReceiptProof => "NoReceiptProof",
255            Self::ConsensusServerNotReady => "ConsensusServerNotReady",
256            Self::ProposalProofError => "ProposalProofError",
257            Self::CryptoServerNotReady => "CryptoServerNotReady",
258            Self::NoneHashResult => "NoneHashResult",
259            Self::ConstructSigError => "ConstructSigError",
260            Self::ConstructKeyPairError => "ConstructKeyPairError",
261            Self::SignError => "SignError",
262            Self::NetworkServerNotReady => "NetworkServerNotReady",
263            Self::SendMsgError => "SendMsgError",
264            Self::BroadcastMsgError => "BroadcastMsgError",
265            Self::MultiAddrParseError => "MultiAddrParseError",
266            Self::DialNodeFail => "DialNodeFail",
267            Self::AddExistedPeer => "AddExistedPeer",
268            Self::ExecuteServerNotReady => "ExecuteServerNotReady",
269            Self::InternalChannelDisconnected => "InternalChannelDisconnected",
270            Self::ReenterBlock => "ReenterBlock",
271            Self::ReenterInvalidBlock => "ReenterInvalidBlock",
272            Self::StorageServerNotReady => "StorageServerNotReady",
273            Self::NotFound => "NotFound",
274            Self::InvalidRegion => "InvalidRegion",
275            Self::InvalidKey => "InvalidKey",
276            Self::BadRegion => "BadRegion",
277            Self::StoreError => "StoreError",
278            Self::LoadError => "LoadError",
279            Self::DeleteError => "DeleteError",
280        }
281    }
282    /// Creates an enum from field names used in the ProtoBuf definition.
283    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
284        match value {
285            "Success" => Some(Self::Success),
286            "ConvertIntError" => Some(Self::ConvertIntError),
287            "NoneStatusCode" => Some(Self::NoneStatusCode),
288            "FatalError" => Some(Self::FatalError),
289            "MisbehaveNode" => Some(Self::MisbehaveNode),
290            "BannedNode" => Some(Self::BannedNode),
291            "AddressOriginCheckError" => Some(Self::AddressOriginCheckError),
292            "ProvideAddressError" => Some(Self::ProvideAddressError),
293            "NoProvideAddress" => Some(Self::NoProvideAddress),
294            "NoBlock" => Some(Self::NoBlock),
295            "NoProof" => Some(Self::NoProof),
296            "NoTxHeight" => Some(Self::NoTxHeight),
297            "NoTxIndex" => Some(Self::NoTxIndex),
298            "NoTransaction" => Some(Self::NoTransaction),
299            "NoBlockHeight" => Some(Self::NoBlockHeight),
300            "NoBlockHash" => Some(Self::NoBlockHash),
301            "NoneProposal" => Some(Self::NoneProposal),
302            "NoneBlockBody" => Some(Self::NoneBlockBody),
303            "NoneBlockHeader" => Some(Self::NoneBlockHeader),
304            "NoneChainStatus" => Some(Self::NoneChainStatus),
305            "NoneWitness" => Some(Self::NoneWitness),
306            "NoneTransaction" => Some(Self::NoneTransaction),
307            "NoneUtxo" => Some(Self::NoneUtxo),
308            "NoneRawTx" => Some(Self::NoneRawTx),
309            "EarlyStatus" => Some(Self::EarlyStatus),
310            "ExecuteError" => Some(Self::ExecuteError),
311            "EncodeError" => Some(Self::EncodeError),
312            "DecodeError" => Some(Self::DecodeError),
313            "NoCandidate" => Some(Self::NoCandidate),
314            "NoEarlyStatus" => Some(Self::NoEarlyStatus),
315            "NoForkTree" => Some(Self::NoForkTree),
316            "DupTransaction" => Some(Self::DupTransaction),
317            "ProposalTooHigh" => Some(Self::ProposalTooHigh),
318            "ProposalTooLow" => Some(Self::ProposalTooLow),
319            "ProposalCheckError" => Some(Self::ProposalCheckError),
320            "ConsensusProposalCheckError" => Some(Self::ConsensusProposalCheckError),
321            "BlockCheckError" => Some(Self::BlockCheckError),
322            "CSISigCheckError" => Some(Self::CsiSigCheckError),
323            "VersionOrIdCheckError" => Some(Self::VersionOrIdCheckError),
324            "HashCheckError" => Some(Self::HashCheckError),
325            "HashLenError" => Some(Self::HashLenError),
326            "SigLenError" => Some(Self::SigLenError),
327            "SigCheckError" => Some(Self::SigCheckError),
328            "NodeInSyncMode" => Some(Self::NodeInSyncMode),
329            "HistoryDupTx" => Some(Self::HistoryDupTx),
330            "EmergencyBrake" => Some(Self::EmergencyBrake),
331            "InvalidVersion" => Some(Self::InvalidVersion),
332            "InvalidTo" => Some(Self::InvalidTo),
333            "InvalidNonce" => Some(Self::InvalidNonce),
334            "InvalidValidUntilBlock" => Some(Self::InvalidValidUntilBlock),
335            "InvalidValue" => Some(Self::InvalidValue),
336            "InvalidChainId" => Some(Self::InvalidChainId),
337            "InvalidWitness" => Some(Self::InvalidWitness),
338            "InvalidLockId" => Some(Self::InvalidLockId),
339            "InvalidPreHash" => Some(Self::InvalidPreHash),
340            "AdminCheckError" => Some(Self::AdminCheckError),
341            "ModuleNotController" => Some(Self::ModuleNotController),
342            "QuotaUsedExceed" => Some(Self::QuotaUsedExceed),
343            "NoStateRoot" => Some(Self::NoStateRoot),
344            "StateRootCheckError" => Some(Self::StateRootCheckError),
345            "UpdateSystemConfigError" => Some(Self::UpdateSystemConfigError),
346            "NoReceiptProof" => Some(Self::NoReceiptProof),
347            "ConsensusServerNotReady" => Some(Self::ConsensusServerNotReady),
348            "ProposalProofError" => Some(Self::ProposalProofError),
349            "CryptoServerNotReady" => Some(Self::CryptoServerNotReady),
350            "NoneHashResult" => Some(Self::NoneHashResult),
351            "ConstructSigError" => Some(Self::ConstructSigError),
352            "ConstructKeyPairError" => Some(Self::ConstructKeyPairError),
353            "SignError" => Some(Self::SignError),
354            "NetworkServerNotReady" => Some(Self::NetworkServerNotReady),
355            "SendMsgError" => Some(Self::SendMsgError),
356            "BroadcastMsgError" => Some(Self::BroadcastMsgError),
357            "MultiAddrParseError" => Some(Self::MultiAddrParseError),
358            "DialNodeFail" => Some(Self::DialNodeFail),
359            "AddExistedPeer" => Some(Self::AddExistedPeer),
360            "ExecuteServerNotReady" => Some(Self::ExecuteServerNotReady),
361            "InternalChannelDisconnected" => Some(Self::InternalChannelDisconnected),
362            "ReenterBlock" => Some(Self::ReenterBlock),
363            "ReenterInvalidBlock" => Some(Self::ReenterInvalidBlock),
364            "StorageServerNotReady" => Some(Self::StorageServerNotReady),
365            "NotFound" => Some(Self::NotFound),
366            "InvalidRegion" => Some(Self::InvalidRegion),
367            "InvalidKey" => Some(Self::InvalidKey),
368            "BadRegion" => Some(Self::BadRegion),
369            "StoreError" => Some(Self::StoreError),
370            "LoadError" => Some(Self::LoadError),
371            "DeleteError" => Some(Self::DeleteError),
372            _ => None,
373        }
374    }
375}