mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-05-31 19:11:02 +00:00
Read extrinsic dispatch result for mined transaction (#1582)
* read extrinsic dispatch result for mined transaction * commit for the history * Revert "commit for the history" This reverts commit 99341b04750639db296172cc1432bd70e458ef4b. * Revert "read extrinsic dispatch result for mined transaction" This reverts commit 662b776cbf992be9f1637e52f023b782e8c441d1. * check for successfult transaction in finality relay * check for successful transaction in parachains relay * TrackedTransactionStatus ->TrackedTransactionStatus<HeaderId> * check for successful transaction in messages relay * fix compilation * message_lane_loop_is_able_to_recover_from_unsuccessful_transaction * fixed too-complex-type clippy error * aaand compilation
This commit is contained in:
committed by
Bastian Köcher
parent
1abd5cb60d
commit
43afa02372
@@ -122,18 +122,21 @@ pub trait MaybeConnectionError {
|
||||
|
||||
/// Final status of the tracked transaction.
|
||||
#[derive(Debug, Clone, Copy, PartialEq)]
|
||||
pub enum TrackedTransactionStatus {
|
||||
pub enum TrackedTransactionStatus<BlockId> {
|
||||
/// Transaction has been lost.
|
||||
Lost,
|
||||
/// Transaction has been mined and finalized.
|
||||
Finalized,
|
||||
/// Transaction has been mined and finalized at given block.
|
||||
Finalized(BlockId),
|
||||
}
|
||||
|
||||
/// Transaction tracker.
|
||||
#[async_trait]
|
||||
pub trait TransactionTracker: Send {
|
||||
/// Header id, used by the chain.
|
||||
type HeaderId: Clone + Send;
|
||||
|
||||
/// Wait until transaction is either finalized or invalidated/lost.
|
||||
async fn wait(self) -> TrackedTransactionStatus;
|
||||
async fn wait(self) -> TrackedTransactionStatus<Self::HeaderId>;
|
||||
}
|
||||
|
||||
/// Stringified error that may be either connection-related or not.
|
||||
|
||||
Reference in New Issue
Block a user