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

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

TxPool

Errors returned from the tx-pool

Network

Errors returned from the network layer

Implementations

impl StatusCode[src]

pub fn with_context<S: ToString>(self, context: S) -> Status[src]

Code with context

Trait Implementations

impl Clone for 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]

Performs copy-assignment from source. Read more

impl Debug for StatusCode[src]

fn fmt(&self, f: &mut Formatter<'_>) -> Result[src]

Formats the value using the given formatter. Read more

impl From<StatusCode> for Status[src]

fn from(code: StatusCode) -> Self[src]

Performs the conversion.

impl PartialEq<StatusCode> for StatusCode[src]

fn eq(&self, other: &StatusCode) -> bool[src]

This method tests for self and other values to be equal, and is used by ==. Read more

#[must_use]
fn ne(&self, other: &Rhs) -> bool
1.0.0[src]

This method tests for !=.

impl Copy for StatusCode[src]

impl Eq for StatusCode[src]

impl StructuralEq for StatusCode[src]

impl StructuralPartialEq for StatusCode[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

pub fn type_id(&self) -> TypeId[src]

Gets the TypeId of self. Read more

impl<T> AsAny for T where
    T: Any

pub fn as_any(&self) -> &(dyn Any + 'static)

TODO(doc): @quake

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

pub fn borrow(&self) -> &T[src]

Immutably borrows from an owned value. Read more

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

pub fn borrow_mut(&mut self) -> &mut T[src]

Mutably borrows from an owned value. Read more

impl<T> From<T> for T[src]

pub fn from(t: T) -> T[src]

Performs the conversion.

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

pub fn into(self) -> U[src]

Performs the conversion.

impl<T> Pointable for T

pub const ALIGN: usize

The alignment of pointer.

type Init = T

The type for initializers.

pub unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more

pub unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more

pub unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more

pub unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

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]

🔬 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<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>[src]

Performs the conversion.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

pub fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>[src]

Performs the conversion.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>, 

pub fn vzip(self) -> V

impl<T> Erased for T