mirror of
https://github.com/paradigmxyz/reth.git
synced 2026-02-04 03:55:22 -05:00
chore: rename crate era-import to era-utils (#15980)
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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(())
|
||||
}
|
||||
|
||||
@@ -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
|
||||
@@ -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;
|
||||
@@ -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);
|
||||
}
|
||||
Reference in New Issue
Block a user