chore: cfg ImportOp behind optimism feature (#8033)

This commit is contained in:
Daniel Ramirez
2024-05-01 15:37:49 -04:00
committed by GitHub
parent 9d2ca45c30
commit f94ce6e780

View File

@ -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<Ext: clap::Args + fmt::Debug> Cli<Ext> {
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<Ext: clap::Args + fmt::Debug = NoArgs> {
#[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.