Enum ckb_sync::StatusCode
source · #[repr(u16)]pub enum StatusCode {
Show 32 variants
OK,
Ignored,
CompactBlockIsAlreadyPending,
CompactBlockIsAlreadyInFlight,
CompactBlockAlreadyStored,
CompactBlockIsStaled,
CompactBlockRequiresParent,
CompactBlockRequiresFreshTransactions,
CompactBlockMeetsShortIdsCollision,
BlocksInFlightReachLimit,
TooManyRequests,
ProtocolMessageIsMalformed,
BlockIsInvalid,
CompactBlockHasInvalidHeader,
CompactBlockHasDuplicatedShortIds,
CompactBlockHasNotPrefilledCellbase,
CompactBlockHasDuplicatedPrefilledTransactions,
CompactBlockHasOutOfOrderPrefilledTransactions,
CompactBlockHasOutOfIndexPrefilledTransactions,
CompactBlockHasInvalidUncle,
CompactBlockHasUnmatchedTransactionRootWithReconstructedBlock,
BlockTransactionsLengthIsUnmatchedWithPendingCompactBlock,
BlockTransactionsShortIdsAreUnmatchedWithPendingCompactBlock,
BlockUnclesLengthIsUnmatchedWithPendingCompactBlock,
BlockUnclesAreUnmatchedWithPendingCompactBlock,
GetHeadersMissCommonAncestors,
HeadersIsInvalid,
TooManyUnknownTransactions,
RequestGenesis,
RequestDuplicate,
TxPool,
Network,
}Expand description
StatusCodes indicate whether a specific operation has been successfully completed. The StatusCode element is a 3-digit integer.
The first digest of the StatusCode defines the class of result:
- 1xx: Informational - Request received, continuing process
- 4xx: Malformed Error - The request contains malformed messages
- 5xx: Warning - The node warns about recoverable conditions
Variants§
OK
OK
Ignored
Ignored
CompactBlockIsAlreadyPending
The node had already received and recorded this block as pending block
CompactBlockIsAlreadyInFlight
The node is requesting from other peers for this block, but no response yet
CompactBlockAlreadyStored
The node had already stored this block into database
CompactBlockIsStaled
The CompactBlock is older than what the node expects
CompactBlockRequiresParent
The node cannot process the arrived CompactBlock successfully for lack of information of its parent
CompactBlockRequiresFreshTransactions
The node cannot process the arrived CompactBlock successfully for lack of parts of its transactions
CompactBlockMeetsShortIdsCollision
CompactBlock short-ids collision
BlocksInFlightReachLimit
In-flight blocks limit exceeded
TooManyRequests
Generic rate limit error
ProtocolMessageIsMalformed
Malformed protocol message
BlockIsInvalid
Block verified failed or the block is already marked as invalid
CompactBlockHasInvalidHeader
Header verified failed or the header is already marked as invalid
CompactBlockHasDuplicatedShortIds
Duplicated short-ids within a same CompactBlock
CompactBlockHasNotPrefilledCellbase
Missing cellbase as the first transaction within a CompactBlock
CompactBlockHasDuplicatedPrefilledTransactions
Duplicated prefilled transactions within a same CompactBlock
CompactBlockHasOutOfOrderPrefilledTransactions
The prefilled transactions are out-of-order
CompactBlockHasOutOfIndexPrefilledTransactions
Some of the prefilled transactions are out-of-index
CompactBlockHasInvalidUncle
Invalid uncle block
CompactBlockHasUnmatchedTransactionRootWithReconstructedBlock
Unmatched Transaction Root
BlockTransactionsLengthIsUnmatchedWithPendingCompactBlock
The length of BlockTransactions is unmatched with in pending_compact_blocks
BlockTransactionsShortIdsAreUnmatchedWithPendingCompactBlock
The short-ids of BlockTransactions is unmatched with in pending_compact_blocks
BlockUnclesLengthIsUnmatchedWithPendingCompactBlock
The length of BlockUncles is unmatched with in pending_compact_blocks
BlockUnclesAreUnmatchedWithPendingCompactBlock
The hash of uncles is unmatched
GetHeadersMissCommonAncestors
Cannot locate the common blocks based on the GetHeaders
HeadersIsInvalid
Headers verified failed
TooManyUnknownTransactions
Too many unknown transactions
RequestGenesis
Request Genesis
RequestDuplicate
Request Duplicate data
TxPool
Errors returned from the tx-pool
Network
Errors returned from the network layer
Implementations§
source§impl StatusCode
impl StatusCode
Trait Implementations§
source§impl Clone for StatusCode
impl Clone for StatusCode
source§fn clone(&self) -> StatusCode
fn clone(&self) -> StatusCode
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moresource§impl Debug for StatusCode
impl Debug for StatusCode
source§impl From<StatusCode> for Status
impl From<StatusCode> for Status
source§fn from(code: StatusCode) -> Self
fn from(code: StatusCode) -> Self
source§impl PartialEq<StatusCode> for StatusCode
impl PartialEq<StatusCode> for StatusCode
source§fn eq(&self, other: &StatusCode) -> bool
fn eq(&self, other: &StatusCode) -> bool
self and other values to be equal, and is used
by ==.impl Copy for StatusCode
impl Eq for StatusCode
impl StructuralEq for StatusCode
impl StructuralPartialEq for StatusCode
Auto Trait Implementations§
impl RefUnwindSafe for StatusCode
impl Send for StatusCode
impl Sync for StatusCode
impl Unpin for StatusCode
impl UnwindSafe for StatusCode
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
source§impl<Q, K> Equivalent<K> for Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
impl<Q, K> Equivalent<K> for Qwhere Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,
source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.