pub enum SubmissionEvent {
Submitted {
tx: Vec<u8>,
tx_hash: HexString,
},
InBlock {
tx: Vec<u8>,
block_hash: HexString,
block_height: u64,
tx_hash: HexString,
},
Finalized {
tx: Vec<u8>,
block_hash: HexString,
block_height: u64,
tx_hash: HexString,
},
}Expand description
Event stream item emitted while a submitted transaction progresses through the node’s tx pool.
Each variant carries the original transaction bytes for correlation —
matches the TS SubmissionEvent which attaches tx to every case.
Variants§
Submitted
Node accepted the extrinsic into its pool. Covers Substrate’s
Ready, Future, Broadcast, and Retracted statuses — from the
wallet’s point of view, the transaction is in flight but not yet
included in a block. A Retracted can reappear as a later InBlock
once the replacement block is imported.
InBlock
The transaction was included in a block. Not yet finalized — the chain
could still re-org. Wallets that need strong finality should wait for
SubmissionEvent::Finalized.
Finalized
The transaction’s including block reached GRANDPA finality. Terminal success — stream completes after this.
Implementations§
Source§impl SubmissionEvent
impl SubmissionEvent
Sourcepub fn stage(&self) -> SubmissionStage
pub fn stage(&self) -> SubmissionStage
Identify which SubmissionStage this event corresponds to. Useful
for the send_and_wait_for pattern where callers pick the stage they
want to block on.
Sourcepub fn block(&self) -> Option<(&str, u64)>
pub fn block(&self) -> Option<(&str, u64)>
Block hash and height — Some only for SubmissionEvent::InBlock
and SubmissionEvent::Finalized. None for SubmissionEvent::Submitted.
Trait Implementations§
Source§impl Clone for SubmissionEvent
impl Clone for SubmissionEvent
Source§impl Debug for SubmissionEvent
impl Debug for SubmissionEvent
impl Eq for SubmissionEvent
Source§impl PartialEq for SubmissionEvent
impl PartialEq for SubmissionEvent
impl StructuralPartialEq for SubmissionEvent
Auto Trait Implementations§
impl Forget for SubmissionEvent
impl Freeze for SubmissionEvent
impl Move for SubmissionEvent
impl RefUnwindSafe for SubmissionEvent
impl Send for SubmissionEventwhere
RawVecInner: Send,
impl Sync for SubmissionEventwhere
RawVecInner: Sync,
impl Unpin for SubmissionEvent
impl UnsafeUnpin for SubmissionEvent
impl UnwindSafe for SubmissionEventwhere
RawVecInner: UnwindSafe,
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more