mirror of
https://github.com/hl-archive-node/nanoreth.git
synced 2025-12-06 10:59:55 +00:00
chore: use create_test_provider_factory in more places (#9463)
This commit is contained in:
@ -6,11 +6,10 @@ use crate::{
|
||||
};
|
||||
use alloy_rlp::Decodable;
|
||||
use rayon::iter::{ParallelBridge, ParallelIterator};
|
||||
use reth_db::test_utils::{create_test_rw_db, create_test_static_files_dir};
|
||||
use reth_primitives::{BlockBody, SealedBlock, StaticFileSegment};
|
||||
use reth_provider::{
|
||||
providers::{StaticFileProvider, StaticFileWriter},
|
||||
HashingWriter, ProviderFactory,
|
||||
providers::StaticFileWriter, test_utils::create_test_provider_factory_with_chain_spec,
|
||||
HashingWriter,
|
||||
};
|
||||
use reth_stages::{stages::ExecutionStage, ExecInput, Stage};
|
||||
use std::{collections::BTreeMap, fs, path::Path, sync::Arc};
|
||||
@ -84,13 +83,9 @@ impl Case for BlockchainTestCase {
|
||||
.par_bridge()
|
||||
.try_for_each(|case| {
|
||||
// Create a new test database and initialize a provider for the test case.
|
||||
let db = create_test_rw_db();
|
||||
let (_static_files_dir, static_files_dir_path) = create_test_static_files_dir();
|
||||
let provider = ProviderFactory::new(
|
||||
db.as_ref(),
|
||||
Arc::new(case.network.clone().into()),
|
||||
StaticFileProvider::read_write(static_files_dir_path).unwrap(),
|
||||
)
|
||||
let provider = create_test_provider_factory_with_chain_spec(Arc::new(
|
||||
case.network.clone().into(),
|
||||
))
|
||||
.provider_rw()
|
||||
.unwrap();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user