pub async fn maintain_tempo_pool<Client>(pool: TempoTransactionPool<Client>)where
Client: StateProviderFactory + HeaderProvider<Header: BlockHeader> + ChainSpecProvider<ChainSpec = TempoChainSpec> + CanonStateSubscriptions<Primitives = TempoPrimitives> + 'static,Expand description
Unified maintenance task for the Tempo transaction pool.
Handles:
- Evicting expired AA transactions (
valid_before <= tip_timestamp) - Evicting transactions using expired keychain keys (
AuthorizedKey.expiry <= tip_timestamp) - Updating the AA 2D nonce pool from
NonceManagerchanges - Refreshing the AMM liquidity cache from
FeeManagerupdates - Removing transactions signed with revoked keychain keys
- Moving transactions to/from the paused pool when fee tokens are paused/unpaused
Consolidates these operations into a single event loop to avoid multiple tasks competing for canonical state updates and to minimize contention on pool locks.