diff --git a/bin/reth/src/cli/mod.rs b/bin/reth/src/cli/mod.rs index e7d2789646..40e1f24be9 100644 --- a/bin/reth/src/cli/mod.rs +++ b/bin/reth/src/cli/mod.rs @@ -1,12 +1,14 @@ //! CLI definition and entrypoint to executable +#[cfg(feature = "optimism")] +use crate::commands::import_op; use crate::{ args::{ utils::{chain_help, genesis_value_parser, SUPPORTED_CHAINS}, LogArgs, }, commands::{ - config_cmd, db, debug_cmd, dump_genesis, import, import_op, init_cmd, init_state, + config_cmd, db, debug_cmd, dump_genesis, import, init_cmd, init_state, node::{self, NoArgs}, p2p, recover, stage, test_vectors, }, @@ -148,6 +150,7 @@ impl Cli { Commands::Init(command) => runner.run_blocking_until_ctrl_c(command.execute()), Commands::InitState(command) => runner.run_blocking_until_ctrl_c(command.execute()), Commands::Import(command) => runner.run_blocking_until_ctrl_c(command.execute()), + #[cfg(feature = "optimism")] Commands::ImportOp(command) => runner.run_blocking_until_ctrl_c(command.execute()), Commands::DumpGenesis(command) => runner.run_blocking_until_ctrl_c(command.execute()), Commands::Db(command) => runner.run_blocking_until_ctrl_c(command.execute()), @@ -186,6 +189,7 @@ pub enum Commands { #[command(name = "import")] Import(import::ImportCommand), /// This syncs RLP encoded OP blocks below Bedrock from a file, without executing. + #[cfg(feature = "optimism")] #[command(name = "import-op")] ImportOp(import_op::ImportOpCommand), /// Dumps genesis block JSON configuration to stdout.