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>
impl<Hash, BlockHash> TransactionStatus<Hash, BlockHash>
pub fn is_final(&self) -> bool
pub fn is_final(&self) -> bool
Returns true if this is the last event emitted by [TransactionStatusStream
].
pub fn is_retriable(&self) -> bool
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.