From aa802012c3e8b2f341e37c57c3c39d2e8e7e36a4 Mon Sep 17 00:00:00 2001 From: Arsenii Kulikov Date: Fri, 20 Dec 2024 18:17:29 +0200 Subject: [PATCH] chore: use NoopConsensus in CLI unwind --- crates/cli/commands/src/stage/unwind.rs | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/crates/cli/commands/src/stage/unwind.rs b/crates/cli/commands/src/stage/unwind.rs index cc5d719d2708..e5ff56055977 100644 --- a/crates/cli/commands/src/stage/unwind.rs +++ b/crates/cli/commands/src/stage/unwind.rs @@ -4,20 +4,18 @@ use crate::common::{AccessRights, CliNodeTypes, Environment, EnvironmentArgs}; use alloy_eips::BlockHashOrNumber; use alloy_primitives::B256; use clap::{Parser, Subcommand}; -use reth_beacon_consensus::EthBeaconConsensus; use reth_chainspec::{EthChainSpec, EthereumHardforks}; use reth_cli::chainspec::ChainSpecParser; use reth_config::Config; -use reth_consensus::Consensus; +use reth_consensus::noop::NoopConsensus; use reth_db::DatabaseEnv; use reth_downloaders::{bodies::noop::NoopBodiesDownloader, headers::noop::NoopHeaderDownloader}; use reth_evm::noop::NoopBlockExecutorProvider; use reth_exex::ExExManagerHandle; use reth_node_core::args::NetworkArgs; use reth_provider::{ - providers::ProviderNodeTypes, BlockExecutionWriter, BlockNumReader, ChainSpecProvider, - ChainStateBlockReader, ChainStateBlockWriter, ProviderFactory, StaticFileProviderFactory, - StorageLocation, + providers::ProviderNodeTypes, BlockExecutionWriter, BlockNumReader, ChainStateBlockReader, + ChainStateBlockWriter, ProviderFactory, StaticFileProviderFactory, StorageLocation, }; use reth_prune::PruneModes; use reth_stages::{ @@ -112,8 +110,6 @@ impl> Command config: Config, provider_factory: ProviderFactory, ) -> Result, eyre::Error> { - let consensus: Arc = - Arc::new(EthBeaconConsensus::new(provider_factory.chain_spec())); let stage_conf = &config.stages; let prune_modes = config.prune.clone().map(|prune| prune.segments).unwrap_or_default(); @@ -133,7 +129,7 @@ impl> Command DefaultStages::new( provider_factory.clone(), tip_rx, - Arc::clone(&consensus), + Arc::new(NoopConsensus::default()), NoopHeaderDownloader::default(), NoopBodiesDownloader::default(), executor.clone(),