mirror of
https://github.com/hl-archive-node/nanoreth.git
synced 2025-12-06 10:59:55 +00:00
chore: extract cli runner from node-core (#7719)
This commit is contained in:
@ -24,6 +24,7 @@ reth-interfaces = { workspace = true, features = ["clap"] }
|
||||
reth-transaction-pool.workspace = true
|
||||
reth-beacon-consensus.workspace = true
|
||||
reth-auto-seal-consensus.workspace = true
|
||||
reth-cli-runner.workspace = true
|
||||
reth-consensus-common.workspace = true
|
||||
reth-blockchain-tree.workspace = true
|
||||
reth-rpc-engine-api.workspace = true
|
||||
|
||||
@ -9,10 +9,10 @@ use crate::{
|
||||
config_cmd, db, debug_cmd, dump_genesis, import, init_cmd, node, node::NoArgs, p2p,
|
||||
recover, stage, test_vectors,
|
||||
},
|
||||
core::cli::runner::CliRunner,
|
||||
version::{LONG_VERSION, SHORT_VERSION},
|
||||
};
|
||||
use clap::{value_parser, Parser, Subcommand};
|
||||
use reth_cli_runner::CliRunner;
|
||||
use reth_db::DatabaseEnv;
|
||||
use reth_node_builder::{InitState, WithLaunchContext};
|
||||
use reth_primitives::ChainSpec;
|
||||
|
||||
@ -5,7 +5,6 @@ use crate::{
|
||||
utils::{chain_help, genesis_value_parser, SUPPORTED_CHAINS},
|
||||
DatabaseArgs,
|
||||
},
|
||||
core::cli::runner::CliContext,
|
||||
dirs::{DataDirPath, MaybePlatformPath},
|
||||
};
|
||||
use alloy_rlp::Decodable;
|
||||
@ -18,6 +17,7 @@ use reth_beacon_consensus::BeaconConsensus;
|
||||
use reth_blockchain_tree::{
|
||||
BlockchainTree, BlockchainTreeConfig, ShareableBlockchainTree, TreeExternals,
|
||||
};
|
||||
use reth_cli_runner::CliContext;
|
||||
use reth_db::{init_db, DatabaseEnv};
|
||||
use reth_interfaces::{consensus::Consensus, RethResult};
|
||||
use reth_node_api::PayloadBuilderAttributes;
|
||||
|
||||
@ -6,13 +6,13 @@ use crate::{
|
||||
utils::{chain_help, genesis_value_parser, SUPPORTED_CHAINS},
|
||||
DatabaseArgs, NetworkArgs,
|
||||
},
|
||||
core::cli::runner::CliContext,
|
||||
dirs::{DataDirPath, MaybePlatformPath},
|
||||
utils::get_single_header,
|
||||
};
|
||||
use clap::Parser;
|
||||
use futures::{stream::select as stream_select, StreamExt};
|
||||
use reth_beacon_consensus::BeaconConsensus;
|
||||
use reth_cli_runner::CliContext;
|
||||
use reth_config::{config::EtlConfig, Config};
|
||||
use reth_db::{database::Database, init_db, DatabaseEnv};
|
||||
use reth_downloaders::{
|
||||
|
||||
@ -6,12 +6,12 @@ use crate::{
|
||||
utils::{chain_help, genesis_value_parser, SUPPORTED_CHAINS},
|
||||
DatabaseArgs, NetworkArgs,
|
||||
},
|
||||
core::cli::runner::CliContext,
|
||||
dirs::{DataDirPath, MaybePlatformPath},
|
||||
utils::{get_single_body, get_single_header},
|
||||
};
|
||||
use backon::{ConstantBuilder, Retryable};
|
||||
use clap::Parser;
|
||||
use reth_cli_runner::CliContext;
|
||||
use reth_config::Config;
|
||||
use reth_db::{init_db, DatabaseEnv};
|
||||
use reth_interfaces::executor::BlockValidationError;
|
||||
|
||||
@ -6,13 +6,13 @@ use crate::{
|
||||
utils::{chain_help, genesis_value_parser, SUPPORTED_CHAINS},
|
||||
DatabaseArgs, NetworkArgs,
|
||||
},
|
||||
core::cli::runner::CliContext,
|
||||
dirs::{DataDirPath, MaybePlatformPath},
|
||||
utils::get_single_header,
|
||||
};
|
||||
use backon::{ConstantBuilder, Retryable};
|
||||
use clap::Parser;
|
||||
use reth_beacon_consensus::BeaconConsensus;
|
||||
use reth_cli_runner::CliContext;
|
||||
use reth_config::Config;
|
||||
use reth_db::{cursor::DbCursorRO, init_db, tables, transaction::DbTx, DatabaseEnv};
|
||||
use reth_interfaces::{consensus::Consensus, p2p::full_block::FullBlockClient};
|
||||
|
||||
@ -1,7 +1,8 @@
|
||||
//! `reth debug` command. Collection of various debugging routines.
|
||||
|
||||
use crate::core::cli::runner::CliContext;
|
||||
use clap::{Parser, Subcommand};
|
||||
use reth_cli_runner::CliContext;
|
||||
|
||||
mod build_block;
|
||||
mod execution;
|
||||
mod in_memory_merkle;
|
||||
|
||||
@ -4,7 +4,6 @@ use crate::{
|
||||
utils::{chain_help, genesis_value_parser, SUPPORTED_CHAINS},
|
||||
DatabaseArgs, NetworkArgs,
|
||||
},
|
||||
core::cli::runner::CliContext,
|
||||
dirs::{DataDirPath, MaybePlatformPath},
|
||||
};
|
||||
use clap::Parser;
|
||||
@ -14,6 +13,7 @@ use reth_beacon_consensus::{hooks::EngineHooks, BeaconConsensus, BeaconConsensus
|
||||
use reth_blockchain_tree::{
|
||||
BlockchainTree, BlockchainTreeConfig, ShareableBlockchainTree, TreeExternals,
|
||||
};
|
||||
use reth_cli_runner::CliContext;
|
||||
use reth_config::Config;
|
||||
use reth_db::{init_db, DatabaseEnv};
|
||||
use reth_interfaces::consensus::Consensus;
|
||||
|
||||
@ -6,10 +6,10 @@ use crate::{
|
||||
DatabaseArgs, DebugArgs, DevArgs, NetworkArgs, PayloadBuilderArgs, PruningArgs,
|
||||
RpcServerArgs, TxPoolArgs,
|
||||
},
|
||||
core::cli::runner::CliContext,
|
||||
dirs::{DataDirPath, MaybePlatformPath},
|
||||
};
|
||||
use clap::{value_parser, Args, Parser};
|
||||
use reth_cli_runner::CliContext;
|
||||
use reth_db::{init_db, DatabaseEnv};
|
||||
use reth_node_builder::{InitState, NodeBuilder, WithLaunchContext};
|
||||
use reth_node_core::{node_config::NodeConfig, version};
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
//! `reth recover` command.
|
||||
|
||||
use crate::core::cli::runner::CliContext;
|
||||
use clap::{Parser, Subcommand};
|
||||
use reth_cli_runner::CliContext;
|
||||
|
||||
mod storage_tries;
|
||||
|
||||
|
||||
@ -1,9 +1,9 @@
|
||||
use crate::{
|
||||
args::utils::{chain_help, genesis_value_parser, SUPPORTED_CHAINS},
|
||||
core::cli::runner::CliContext,
|
||||
dirs::{DataDirPath, MaybePlatformPath},
|
||||
};
|
||||
use clap::Parser;
|
||||
use reth_cli_runner::CliContext;
|
||||
use reth_db::{
|
||||
cursor::{DbCursorRO, DbDupCursorRW},
|
||||
init_db, tables,
|
||||
|
||||
@ -158,6 +158,10 @@ pub mod rpc {
|
||||
}
|
||||
}
|
||||
|
||||
// re-export for convenience
|
||||
#[doc(inline)]
|
||||
pub use reth_cli_runner::{tokio_runtime, CliContext, CliRunner};
|
||||
|
||||
#[cfg(all(unix, any(target_env = "gnu", target_os = "macos")))]
|
||||
pub mod sigsegv_handler;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user