Function cache_new_blocks_task

Source
pub async fn cache_new_blocks_task<St, N>(
    eth_state_cache: EthStateCache<<N as NodePrimitives>::Block, <N as NodePrimitives>::Receipt>,
    events: St,
)
where N: NodePrimitives, St: Stream<Item = CanonStateNotification<N>> + Unpin + 'static,
Available on crate feature rpc only.
Expand description

Awaits for new chain events and directly inserts them into the cache so they’re available immediately before they need to be fetched from disk.

Reorged blocks are removed from the cache.