chore: move cli runner to reth-node-core (#6710)

This commit is contained in:
Roman Krasiuk
2024-02-21 11:55:30 +01:00
committed by GitHub
parent c8c422e278
commit a43885e5d8
15 changed files with 16 additions and 16 deletions

View File

@ -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()),

View File

@ -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;

View File

@ -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;

View File

@ -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};

View File

@ -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};

View File

@ -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;

View File

@ -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;

View File

@ -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;

View File

@ -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

View File

@ -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::{

View File

@ -29,7 +29,6 @@
pub mod builder;
pub mod cli;
pub mod commands;
pub mod runner;
pub mod utils;
/// Re-exported payload related types

View File

@ -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};

View File

@ -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

View File

@ -4,3 +4,4 @@ pub mod components;
pub mod config;
pub mod db_type;
pub mod ext;
pub mod runner;