mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-06-12 17:01:09 +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:
@@ -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