Subscribe to `NewBlock` notifications and clear transactions from the caches.`
(
client: FendermintClient<HybridClient>,
tx_cache: TransactionCache,
tx_buffer: TransactionBuffer,
)
| 80 | |
| 81 | /// Subscribe to `NewBlock` notifications and clear transactions from the caches.` |
| 82 | pub fn start_tx_cache_clearing( |
| 83 | client: FendermintClient<HybridClient>, |
| 84 | tx_cache: TransactionCache, |
| 85 | tx_buffer: TransactionBuffer, |
| 86 | ) { |
| 87 | tokio::task::spawn(async move { |
| 88 | let chain_id = get_chain_id(&client).await; |
| 89 | tx_cache_clearing_loop(client.into_underlying(), chain_id, tx_cache, tx_buffer).await; |
| 90 | }); |
| 91 | } |
| 92 | |
| 93 | /// Subscribe to notifications about new blocks and |
| 94 | /// 1) remove all included transactions from the caches |
no test coverage detected