Skip to main content

spawn

Function spawn 

Source
pub(crate) fn spawn<N: Network, B: ForkBlockEnv>(
    fork: &Fork,
    backend: &SharedBackend<N, B>,
) -> Option<Prefetch>
Expand description

Starts a background prefetch through backend if its cache is empty.

Each key is read through the backend like an EVM read, so the backend fetches and caches it with its own request path, and a key it already has costs no request. Loading the previous cache file runs in the background too, so it does not block the fork handler.