mirror of
https://github.com/hl-archive-node/nanoreth.git
synced 2025-12-06 10:59:55 +00:00
chore: move cli runner to reth-node-core (#6710)
This commit is contained in:
@ -9,7 +9,7 @@ use crate::{
|
||||
commands::{
|
||||
config_cmd, db, debug_cmd, import, init_cmd, node, p2p, recover, stage, test_vectors,
|
||||
},
|
||||
runner::CliRunner,
|
||||
core::cli::runner::CliRunner,
|
||||
version::{LONG_VERSION, SHORT_VERSION},
|
||||
};
|
||||
use clap::{value_parser, Parser, Subcommand};
|
||||
@ -76,7 +76,7 @@ impl<Ext: RethCliExt> Cli<Ext> {
|
||||
|
||||
let _guard = self.init_tracing()?;
|
||||
|
||||
let runner = CliRunner;
|
||||
let runner = CliRunner::default();
|
||||
match self.command {
|
||||
Commands::Node(command) => runner.run_command_until_exit(|ctx| command.execute(ctx)),
|
||||
Commands::Init(command) => runner.run_blocking_until_ctrl_c(command.execute()),
|
||||
|
||||
@ -5,8 +5,8 @@ use crate::{
|
||||
utils::{chain_help, genesis_value_parser, SUPPORTED_CHAINS},
|
||||
DatabaseArgs,
|
||||
},
|
||||
core::cli::runner::CliContext,
|
||||
dirs::{DataDirPath, MaybePlatformPath},
|
||||
runner::CliContext,
|
||||
};
|
||||
use alloy_rlp::Decodable;
|
||||
use clap::Parser;
|
||||
|
||||
@ -6,8 +6,8 @@ use crate::{
|
||||
utils::{chain_help, genesis_value_parser, SUPPORTED_CHAINS},
|
||||
DatabaseArgs, NetworkArgs,
|
||||
},
|
||||
core::cli::runner::CliContext,
|
||||
dirs::{DataDirPath, MaybePlatformPath},
|
||||
runner::CliContext,
|
||||
utils::get_single_header,
|
||||
};
|
||||
use clap::Parser;
|
||||
|
||||
@ -6,8 +6,8 @@ use crate::{
|
||||
utils::{chain_help, genesis_value_parser, SUPPORTED_CHAINS},
|
||||
DatabaseArgs, NetworkArgs,
|
||||
},
|
||||
core::cli::runner::CliContext,
|
||||
dirs::{DataDirPath, MaybePlatformPath},
|
||||
runner::CliContext,
|
||||
utils::{get_single_body, get_single_header},
|
||||
};
|
||||
use backon::{ConstantBuilder, Retryable};
|
||||
|
||||
@ -6,8 +6,8 @@ use crate::{
|
||||
utils::{chain_help, genesis_value_parser, SUPPORTED_CHAINS},
|
||||
DatabaseArgs, NetworkArgs,
|
||||
},
|
||||
core::cli::runner::CliContext,
|
||||
dirs::{DataDirPath, MaybePlatformPath},
|
||||
runner::CliContext,
|
||||
utils::get_single_header,
|
||||
};
|
||||
use backon::{ConstantBuilder, Retryable};
|
||||
|
||||
@ -1,9 +1,8 @@
|
||||
//! `reth debug` command. Collection of various debugging routines.
|
||||
|
||||
use crate::core::cli::runner::CliContext;
|
||||
use clap::{Parser, Subcommand};
|
||||
|
||||
use crate::runner::CliContext;
|
||||
|
||||
mod build_block;
|
||||
pub mod engine_api_store;
|
||||
mod execution;
|
||||
|
||||
@ -5,8 +5,8 @@ use crate::{
|
||||
DatabaseArgs, NetworkArgs,
|
||||
},
|
||||
commands::debug_cmd::engine_api_store::{EngineApiStore, StoredEngineApiMessage},
|
||||
core::cli::runner::CliContext,
|
||||
dirs::{DataDirPath, MaybePlatformPath},
|
||||
runner::CliContext,
|
||||
};
|
||||
use clap::Parser;
|
||||
use eyre::Context;
|
||||
|
||||
@ -10,8 +10,8 @@ use crate::{
|
||||
},
|
||||
builder::{launch_from_config, NodeConfig},
|
||||
cli::{db_type::DatabaseBuilder, ext::RethCliExt},
|
||||
core::cli::runner::CliContext,
|
||||
dirs::{DataDirPath, MaybePlatformPath},
|
||||
runner::CliContext,
|
||||
};
|
||||
use clap::{value_parser, Parser};
|
||||
use reth_auto_seal_consensus::AutoSealConsensus;
|
||||
|
||||
@ -1,9 +1,8 @@
|
||||
//! `reth recover` command.
|
||||
|
||||
use crate::core::cli::runner::CliContext;
|
||||
use clap::{Parser, Subcommand};
|
||||
|
||||
use crate::runner::CliContext;
|
||||
|
||||
mod storage_tries;
|
||||
|
||||
/// `reth recover` command
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
use crate::{
|
||||
args::utils::{chain_help, genesis_value_parser, SUPPORTED_CHAINS},
|
||||
core::cli::runner::CliContext,
|
||||
dirs::{DataDirPath, MaybePlatformPath},
|
||||
runner::CliContext,
|
||||
};
|
||||
use clap::Parser;
|
||||
use reth_db::{
|
||||
|
||||
@ -29,7 +29,6 @@
|
||||
pub mod builder;
|
||||
pub mod cli;
|
||||
pub mod commands;
|
||||
pub mod runner;
|
||||
pub mod utils;
|
||||
|
||||
/// Re-exported payload related types
|
||||
|
||||
@ -8,7 +8,7 @@ use reth::{
|
||||
ext::{NoArgs, NoArgsCliExt, RethNodeCommandConfig},
|
||||
},
|
||||
commands::node::NodeCommand,
|
||||
runner::CliRunner,
|
||||
core::cli::runner::CliRunner,
|
||||
tasks::TaskSpawner,
|
||||
};
|
||||
use reth_primitives::{hex, revm_primitives::FixedBytes, ChainSpec, Genesis};
|
||||
|
||||
@ -45,9 +45,11 @@ reth-prune.workspace = true
|
||||
reth-blockchain-tree.workspace = true
|
||||
revm-inspectors.workspace = true
|
||||
reth-snapshot.workspace = true
|
||||
reth-optimism-payload-builder = { workspace = true, optional = true }
|
||||
reth-eth-wire.workspace = true
|
||||
|
||||
# `optimism` feature
|
||||
reth-optimism-payload-builder = { workspace = true, optional = true }
|
||||
|
||||
# async
|
||||
tokio.workspace = true
|
||||
|
||||
|
||||
@ -4,3 +4,4 @@ pub mod components;
|
||||
pub mod config;
|
||||
pub mod db_type;
|
||||
pub mod ext;
|
||||
pub mod runner;
|
||||
|
||||
Reference in New Issue
Block a user