Enum ckb_sync::StatusCode
source · [−]#[repr(u16)]
pub enum StatusCode {
Show 30 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,
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
TxPool
Errors returned from the tx-pool
Network
Errors returned from the network layer
Implementations
sourceimpl StatusCode
impl StatusCode
sourcepub fn with_context<S: ToString>(self, context: S) -> Status
pub fn with_context<S: ToString>(self, context: S) -> Status
Code with context
Trait Implementations
sourceimpl Clone for StatusCode
impl Clone for StatusCode
sourcefn clone(&self) -> StatusCode
fn clone(&self) -> StatusCode
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source. Read more
sourceimpl Debug for StatusCode
impl Debug for StatusCode
sourceimpl From<StatusCode> for Status
impl From<StatusCode> for Status
sourcefn from(code: StatusCode) -> Self
fn from(code: StatusCode) -> Self
Converts to this type from the input type.
sourceimpl PartialEq<StatusCode> for StatusCode
impl PartialEq<StatusCode> for StatusCode
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
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<Q, K> Equivalent<K> for Q where
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
impl<Q, K> Equivalent<K> for Q where
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
sourcefn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to key and return true if they are equal.
sourceimpl<T> Instrument for T
impl<T> Instrument for T
sourcefn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
sourcefn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
impl<T> Pointable for T
impl<T> Pointable for T
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcefn clone_into(&self, target: &mut T)
fn clone_into(&self, target: &mut T)
toowned_clone_into)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>,
fn vzip(self) -> V
sourceimpl<T> WithSubscriber for T
impl<T> WithSubscriber for T
sourcefn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
Attaches the provided Subscriber to this type, returning a
WithDispatch wrapper. Read more
sourcefn with_current_subscriber(self) -> WithDispatch<Self>
fn with_current_subscriber(self) -> WithDispatch<Self>
Attaches the current default Subscriber to this type, returning a
WithDispatch wrapper. Read more