pub async fn import_receipts_from_reader<N, F>(
    provider_factory: &ProviderFactory<N>,
    reader: ChunkedFileReader,
    filter: F,
) -> Result<ImportReceiptsResult>
where N: NodeTypesWithDB<ChainSpec = ChainSpec>, F: FnMut(u64, &mut Receipts) -> usize,
Available on crate feature optimism only.
Expand description

Imports receipts to static files. Takes a filter callback as parameter, that returns the total number of filtered out receipts.

Caution! Filter callback must replace completely filtered out receipts for a block, with empty vectors, rather than vec!(None). This is since the code for writing to static files, expects indices in the Receipts list, to map to sequential block numbers.