mirror of
https://github.com/hl-archive-node/nanoreth.git
synced 2025-12-06 10:59:55 +00:00
feat: consensus trait generic over NodePrimitives (#13026)
This commit is contained in:
@ -17,7 +17,7 @@ use reth_chainspec::ChainSpec;
|
||||
use reth_cli::chainspec::ChainSpecParser;
|
||||
use reth_cli_commands::common::{AccessRights, CliNodeTypes, Environment, EnvironmentArgs};
|
||||
use reth_cli_runner::CliContext;
|
||||
use reth_consensus::Consensus;
|
||||
use reth_consensus::{Consensus, FullConsensus};
|
||||
use reth_errors::RethResult;
|
||||
use reth_evm::execute::{BlockExecutorProvider, Executor};
|
||||
use reth_execution_types::ExecutionOutcome;
|
||||
@ -128,7 +128,7 @@ impl<C: ChainSpecParser<ChainSpec = ChainSpec>> Command<C> {
|
||||
) -> eyre::Result<()> {
|
||||
let Environment { provider_factory, .. } = self.env.init::<N>(AccessRights::RW)?;
|
||||
|
||||
let consensus: Arc<dyn Consensus> =
|
||||
let consensus: Arc<dyn FullConsensus> =
|
||||
Arc::new(EthBeaconConsensus::new(provider_factory.chain_spec()));
|
||||
|
||||
let executor = EthExecutorProvider::ethereum(provider_factory.chain_spec());
|
||||
|
||||
@ -12,7 +12,7 @@ use reth_cli_commands::common::{AccessRights, CliNodeTypes, Environment, Environ
|
||||
use reth_cli_runner::CliContext;
|
||||
use reth_cli_util::get_secret_key;
|
||||
use reth_config::Config;
|
||||
use reth_consensus::Consensus;
|
||||
use reth_consensus::FullConsensus;
|
||||
use reth_db::DatabaseEnv;
|
||||
use reth_engine_util::engine_store::{EngineMessageStore, StoredEngineApiMessage};
|
||||
use reth_fs_util as fs;
|
||||
@ -92,7 +92,7 @@ impl<C: ChainSpecParser<ChainSpec = ChainSpec>> Command<C> {
|
||||
let Environment { provider_factory, config, data_dir } =
|
||||
self.env.init::<N>(AccessRights::RW)?;
|
||||
|
||||
let consensus: Arc<dyn Consensus> =
|
||||
let consensus: Arc<dyn FullConsensus> =
|
||||
Arc::new(EthBeaconConsensus::new(provider_factory.chain_spec()));
|
||||
|
||||
let executor = EthExecutorProvider::ethereum(provider_factory.chain_spec());
|
||||
|
||||
Reference in New Issue
Block a user