[][src]Enum ckb_sync::StatusCode

#[repr(u16)]pub enum StatusCode {
    OK,
    Ignored,
    CompactBlockIsAlreadyPending,
    CompactBlockIsAlreadyInFlight,
    CompactBlockAlreadyStored,
    CompactBlockIsStaled,
    CompactBlockRequiresParent,
    CompactBlockRequiresFreshTransactions,
    CompactBlockMeetsShortIdsCollision,
    ProtocolMessageIsMalformed,
    BlockIsInvalid,
    CompactBlockHasInvalidHeader,
    CompactBlockHasDuplicatedShortIds,
    CompactBlockHasNotPrefilledCellbase,
    CompactBlockHasDuplicatedPrefilledTransactions,
    CompactBlockHasOutOfOrderPrefilledTransactions,
    CompactBlockHasOutOfIndexPrefilledTransactions,
    CompactBlockHasInvalidUncle,
    CompactBlockHasUnmatchedTransactionRootWithReconstructedBlock,
    BlockTransactionsLengthIsUnmatchedWithPendingCompactBlock,
    BlockTransactionsShortIdsAreUnmatchedWithPendingCompactBlock,
    BlockUnclesLengthIsUnmatchedWithPendingCompactBlock,
    BlockUnclesAreUnmatchedWithPendingCompactBlock,
    GetHeadersMissCommonAncestors,
    TooManyRequests,
    TxPool,
    Network,
    BlocksInFlightReachLimit,
}

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

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

TooManyRequests

Generic rate limit error

TxPool

Errors returned from the tx-pool

Network

Errors returned from the network layer

BlocksInFlightReachLimit

In-flight blocks limit exceeded

Implementations

impl StatusCode[src]

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

TODO(doc): @driftluo

Trait Implementations

impl Clone for StatusCode[src]

impl Copy for StatusCode[src]

impl Debug for StatusCode[src]

impl Eq for StatusCode[src]

impl From<StatusCode> for Status[src]

impl PartialEq<StatusCode> 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]

impl<T> AsAny for T where
    T: Any

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

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

impl<Q, K> Equivalent<K> for Q where
    K: Borrow<Q> + ?Sized,
    Q: Eq + ?Sized
[src]

impl<T> Erased for T

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

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

impl<T> Pointable for T

type Init = T

The type for initializers.

impl<T> Same<T> for T

type Output = T

Should always be Self

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

type Owned = T

The resulting type after obtaining ownership.

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.

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.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 

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

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