mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-06-12 17:01:09 +00:00
Revalidate transactions only on latest best block (#6824)
* Revalidate transactions only on latest best block We should revalidate transactions only on the latest best block and not on any arbitrary block. The revalidation before failed when there were multiple blocks on the height given to the revalidation function, but no block was imported as best block. * Update test-utils/runtime/transaction-pool/src/lib.rs Co-authored-by: Jaco Greeff <jacogr@gmail.com> * Fix tests * Only process best blocks in the transaction pool Co-authored-by: Jaco Greeff <jacogr@gmail.com>
This commit is contained in:
@@ -248,14 +248,10 @@ pub trait TransactionPool: Send + Sync {
|
||||
|
||||
/// Events that the transaction pool listens for.
|
||||
pub enum ChainEvent<B: BlockT> {
|
||||
/// New blocks have been added to the chain
|
||||
NewBlock {
|
||||
/// Is this the new best block.
|
||||
is_new_best: bool,
|
||||
/// New best block have been added to the chain
|
||||
NewBestBlock {
|
||||
/// Hash of the block.
|
||||
hash: B::Hash,
|
||||
/// Header of the just imported block
|
||||
header: B::Header,
|
||||
/// Tree route from old best to new best parent that was calculated on import.
|
||||
///
|
||||
/// If `None`, no re-org happened on import.
|
||||
|
||||
Reference in New Issue
Block a user