#[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

Code with context

Trait Implementations

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Formats the value using the given formatter. Read more

Performs the conversion.

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

This method tests for !=.

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

TODO(doc): @quake

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Compare self to key and return true if they are equal.

Performs the conversion.

Performs the conversion.

The alignment of pointer.

The type for initializers.

Initializes a with the given initializer. Read more

Dereferences the given pointer. Read more

Mutably dereferences the given pointer. Read more

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

The resulting type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

🔬 This is a nightly-only experimental API. (toowned_clone_into)

Uses borrowed data to replace owned data, usually by cloning. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.