feat: introduce OpNetworkPrimitives (#13335)

This commit is contained in:
Dan Cline
2024-12-16 13:24:36 +02:00
committed by GitHub
parent 4405f1b3d3
commit 8b647d6ddf
10 changed files with 98 additions and 34 deletions

View File

@ -16,6 +16,7 @@ use reth_cli_commands::{
use reth_cli_runner::CliRunner;
use reth_db::DatabaseEnv;
use reth_ethereum_cli::chainspec::EthereumChainSpecParser;
use reth_network::EthNetworkPrimitives;
use reth_node_builder::{NodeBuilder, WithLaunchContext};
use reth_node_ethereum::{EthExecutorProvider, EthereumNode};
use reth_node_metrics::recorder::install_prometheus_recorder;
@ -169,9 +170,14 @@ impl<C: ChainSpecParser<ChainSpec = ChainSpec>, Ext: clap::Args + fmt::Debug> Cl
runner.run_blocking_until_ctrl_c(command.execute::<EthereumNode>())
}
Commands::Stage(command) => runner.run_command_until_exit(|ctx| {
command.execute::<EthereumNode, _, _>(ctx, EthExecutorProvider::ethereum)
command.execute::<EthereumNode, _, _, EthNetworkPrimitives>(
ctx,
EthExecutorProvider::ethereum,
)
}),
Commands::P2P(command) => runner.run_until_ctrl_c(command.execute()),
Commands::P2P(command) => {
runner.run_until_ctrl_c(command.execute::<EthNetworkPrimitives>())
}
#[cfg(feature = "dev")]
Commands::TestVectors(command) => runner.run_until_ctrl_c(command.execute()),
Commands::Config(command) => runner.run_until_ctrl_c(command.execute()),