Enum ckb_sync::StatusCode [−][src]
#[repr(u16)]
pub enum StatusCode {
Show 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,
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
Ignored
The node had already received and recorded this block as pending block
The node is requesting from other peers for this block, but no response yet
The node had already stored this block into database
The CompactBlock is older than what the node expects
The node cannot process the arrived CompactBlock successfully for lack of information of its parent
The node cannot process the arrived CompactBlock successfully for lack of parts of its transactions
CompactBlock short-ids collision
In-flight blocks limit exceeded
Generic rate limit error
Malformed protocol message
Block verified failed or the block is already marked as invalid
Header verified failed or the header is already marked as invalid
Duplicated short-ids within a same CompactBlock
Missing cellbase as the first transaction within a CompactBlock
Duplicated prefilled transactions within a same CompactBlock
The prefilled transactions are out-of-order
Some of the prefilled transactions are out-of-index
Invalid uncle block
Unmatched Transaction Root
The length of BlockTransactions is unmatched with in pending_compact_blocks
The short-ids of BlockTransactions is unmatched with in pending_compact_blocks
The length of BlockUncles is unmatched with in pending_compact_blocks
The hash of uncles is unmatched
Cannot locate the common blocks based on the GetHeaders
Headers verified failed
Errors returned from the tx-pool
Errors returned from the network layer
Implementations
impl StatusCode[src]
impl StatusCode[src]pub fn with_context<S: ToString>(self, context: S) -> Status[src]
pub fn with_context<S: ToString>(self, context: S) -> Status[src]Code with context
Trait Implementations
impl Clone for StatusCode[src]
impl Clone for StatusCode[src]fn clone(&self) -> StatusCode[src]
fn clone(&self) -> StatusCode[src]Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)1.0.0[src]
fn clone_from(&mut self, source: &Self)1.0.0[src]Performs copy-assignment from source. Read more
impl Debug for StatusCode[src]
impl Debug for StatusCode[src]impl From<StatusCode> for Status[src]
impl From<StatusCode> for Status[src]fn from(code: StatusCode) -> Self[src]
fn from(code: StatusCode) -> Self[src]Performs the conversion.
impl PartialEq<StatusCode> for StatusCode[src]
impl PartialEq<StatusCode> for StatusCode[src]impl Copy for StatusCode[src]
impl Eq for StatusCode[src]
impl StructuralEq for StatusCode[src]
impl StructuralPartialEq for StatusCode[src]
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
impl<T> BorrowMut<T> for T where
T: ?Sized, [src]
impl<T> BorrowMut<T> for T where
T: ?Sized, [src]pub fn borrow_mut(&mut self) -> &mut T[src]
pub fn borrow_mut(&mut self) -> &mut T[src]Mutably borrows from an owned value. Read more
impl<T> Pointable for T
impl<T> Pointable for Timpl<T> ToOwned for T where
T: Clone, [src]
impl<T> ToOwned for T where
T: Clone, [src]type Owned = T
type Owned = TThe resulting type after obtaining ownership.
pub fn to_owned(&self) -> T[src]
pub fn to_owned(&self) -> T[src]Creates owned data from borrowed data, usually by cloning. Read more
pub fn clone_into(&self, target: &mut T)[src]
pub fn clone_into(&self, target: &mut T)[src]🔬 This is a nightly-only experimental API. (toowned_clone_into)
recently added
Uses borrowed data to replace owned data, usually by cloning. Read more
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
impl<V, T> VZip<V> for T where
V: MultiLane<T>,