referrerpolicy=no-referrer-when-downgrade
relay_substrate_client

Type Alias TransactionStatusOf

Source
pub type TransactionStatusOf<C> = TransactionStatus<HashOf<C>, HashOf<C>>;
Expand description

Transaction status of the chain.

Aliased Type§

enum TransactionStatusOf<C> {
    Future,
    Ready,
    Broadcast(Vec<String>),
    InBlock((<C as Chain>::Hash, usize)),
    Retracted(<C as Chain>::Hash),
    FinalityTimeout(<C as Chain>::Hash),
    Finalized((<C as Chain>::Hash, usize)),
    Usurped(<C as Chain>::Hash),
    Dropped,
    Invalid,
}

Variants§

§

Future

Transaction is part of the future queue.

§

Ready

Transaction is part of the ready queue.

§

Broadcast(Vec<String>)

The transaction has been broadcast to the given peers.

§

InBlock((<C as Chain>::Hash, usize))

Transaction has been included in block with given hash at the given position.

§

Retracted(<C as Chain>::Hash)

The block this transaction was included in has been retracted.

§

FinalityTimeout(<C as Chain>::Hash)

Maximum number of finality watchers has been reached, old watchers are being removed.

§

Finalized((<C as Chain>::Hash, usize))

Transaction has been finalized by a finality-gadget, e.g. GRANDPA.

§

Usurped(<C as Chain>::Hash)

Transaction has been replaced in the pool, by another transaction that provides the same tags. (e.g. same (sender, nonce)).

§

Dropped

Transaction has been dropped from the pool because of the limit.

§

Invalid

Transaction is no longer valid in the current state.

Implementations

§

impl<Hash, BlockHash> TransactionStatus<Hash, BlockHash>

pub fn is_final(&self) -> bool

Returns true if this is the last event emitted by [TransactionStatusStream].

pub fn is_retriable(&self) -> bool

Returns true if the transaction could be re-submitted to the pool in the future.

For example, TransactionStatus::Dropped is retriable, because the transaction may enter the pool if there is space for it in the future.

Trait Implementations

§

impl<Hash, BlockHash> Clone for TransactionStatus<Hash, BlockHash>
where Hash: Clone, BlockHash: Clone,

§

fn clone(&self) -> TransactionStatus<Hash, BlockHash>

Returns a copy of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
§

impl<Hash, BlockHash> Debug for TransactionStatus<Hash, BlockHash>
where Hash: Debug, BlockHash: Debug,

§

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

Formats the value using the given formatter. Read more
§

impl<'de, Hash, BlockHash> Deserialize<'de> for TransactionStatus<Hash, BlockHash>
where Hash: Deserialize<'de>, BlockHash: Deserialize<'de>,

§

fn deserialize<__D>( __deserializer: __D, ) -> Result<TransactionStatus<Hash, BlockHash>, <__D as Deserializer<'de>>::Error>
where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
§

impl<Hash, BlockHash> PartialEq for TransactionStatus<Hash, BlockHash>
where Hash: PartialEq, BlockHash: PartialEq,

§

fn eq(&self, other: &TransactionStatus<Hash, BlockHash>) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
§

impl<Hash, BlockHash> Serialize for TransactionStatus<Hash, BlockHash>
where Hash: Serialize, BlockHash: Serialize,

§

fn serialize<__S>( &self, __serializer: __S, ) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more
§

impl<Hash, BlockHash> StructuralPartialEq for TransactionStatus<Hash, BlockHash>