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:
Bastian Köcher authored and GitHub committed 2023-06-02 19:37:35 +01:00
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 {