Skip to main content

import_blocks_from_file

Function import_blocks_from_file 

Source
pub async fn import_blocks_from_file<N>(
    path: &Path,
    import_config: ImportConfig,
    provider_factory: ProviderFactory<N>,
    config: &Config,
    executor: impl ConfigureEvm<Primitives = N::Primitives> + 'static,
    consensus: Arc<impl FullConsensus<N::Primitives> + 'static>,
    runtime: Runtime,
) -> Result<ImportResult>
Expand description

Imports blocks from an RLP-encoded file into the database.

This function reads RLP-encoded blocks from a file in chunks and imports them using the pipeline infrastructure. It’s designed to be used both from the CLI and from test code.