mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-11-04 18:01:07 +00:00
sc-transaction-pool: Always use best block to check if we should skip enactment (#14285)
We will calculate the tree route always against the best block and thus, we also should use this one to check if we should skip the checks.
This commit is contained in:
1 parent
9dedddafad
commit
51c87d8525
4 files changed
+27
-17
No files matched your search
@@ -311,6 +311,20 @@ pub enum ChainEvent<B: BlockT> {
|
||||
},
|
||||
}
|
||||
|
||||
impl<B: BlockT> ChainEvent<B> {
|
||||
/// Returns the block hash associated to the event.
|
||||
pub fn hash(&self) -> B::Hash {
|
||||
match self {
|
||||
Self::NewBestBlock { hash, .. } | Self::Finalized { hash, .. } => *hash,
|
||||
}
|
||||
}
|
||||
|
||||
/// Is `self == Self::Finalized`?
|
||||
pub fn is_finalized(&self) -> bool {
|
||||
matches!(self, Self::Finalized { .. })
|
||||
}
|
||||
}
|
||||
|
||||
/// Trait for transaction pool maintenance.
|
||||
#[async_trait]
|
||||
pub trait MaintainedTransactionPool: TransactionPool {
|
||||
|
||||
Reference in new issue
Block a user