chore: rename crate era-import to era-utils (#15980)

This commit is contained in:
Léa Narzis
2025-04-28 22:07:28 +02:00
committed by GitHub
parent 86adfac165
commit c19dfe9531
10 changed files with 12 additions and 15 deletions

View File

@@ -25,7 +25,7 @@ reth-downloaders.workspace = true
reth-ecies.workspace = true
reth-eth-wire.workspace = true
reth-era-downloader.workspace = true
reth-era-import.workspace = true
reth-era-utils.workspace = true
reth-etl.workspace = true
reth-evm.workspace = true
reth-exex.workspace = true

View File

@@ -35,11 +35,7 @@ impl<C: ChainSpecParser<ChainSpec: EthChainSpec + EthereumHardforks>> ImportEraC
let hash_collector = Collector::new(config.stages.etl.file_size, config.stages.etl.dir);
let stream = read_dir(self.path)?;
reth_era_import::import(
stream,
&provider_factory.provider_rw().unwrap().0,
hash_collector,
)?;
reth_era_utils::import(stream, &provider_factory.provider_rw().unwrap().0, hash_collector)?;
Ok(())
}

View File

@@ -1,6 +1,6 @@
[package]
name = "reth-era-import"
description = "Imports history from ERA files"
name = "reth-era-utils"
description = "Utilities to store and fetch history data with storage-api"
version.workspace = true
edition.workspace = true
rust-version.workspace = true

View File

@@ -1,7 +1,8 @@
//! Imports history from ERA files.
//! Utilities to store history from downloaded ERA files with storage-api
//!
//! The import is downloaded using [`reth_era_downloader`] and parsed using [`reth_era`].
mod history;
/// Imports history from ERA files.
pub use history::import;

View File

@@ -35,7 +35,7 @@ async fn test_history_imports_from_fresh_state_successfully() {
let expected_block_number = 8191;
let actual_block_number =
reth_era_import::import(stream, &pf.provider_rw().unwrap().0, hash_collector).unwrap();
reth_era_utils::import(stream, &pf.provider_rw().unwrap().0, hash_collector).unwrap();
assert_eq!(actual_block_number, expected_block_number);
}