diff --git a/core/cli/src/cli.rs b/core/cli/src/cli.rs index 3ceeb16a3..f681dcfa2 100644 --- a/core/cli/src/cli.rs +++ b/core/cli/src/cli.rs @@ -17,7 +17,7 @@ use crate::args::{Args, Command}; use crate::commands::run::CustomStartShutdown; use crate::commands::{dev, key, print_config, run}; use crate::config::TomlConfigProvider; -use crate::node::{FinalTypes, WithMockConsensus}; +use crate::types::{FinalTypes, WithMockConsensus}; use crate::utils::fs::ensure_parent_exist; use crate::utils::log_filter::CustomLogFilter; @@ -30,7 +30,7 @@ impl Cli { Self { args } } - pub async fn run(self) -> Result<()> { + pub async fn exec(self) -> Result<()> { self.setup(); let config_path = ResolvedPathBuf::try_from(self.args.config.as_str()) @@ -38,12 +38,15 @@ impl Cli { ensure_parent_exist(&config_path)?; match self.args.with_mock_consensus { - true => self.exec::(config_path, None).await, - false => self.exec::(config_path, None).await, + true => { + log::info!("Using MockConsensus"); + self.run::(config_path, None).await + }, + false => self.run::(config_path, None).await, } } - async fn exec( + async fn run( self, config_path: ResolvedPathBuf, custom_start_shutdown: Option>, diff --git a/core/cli/src/main.rs b/core/cli/src/main.rs index d8e1123db..c9587593f 100644 --- a/core/cli/src/main.rs +++ b/core/cli/src/main.rs @@ -2,9 +2,9 @@ mod args; mod cli; mod commands; mod config; -mod node; mod shutdown; mod testnet_sync; +mod types; mod utils; use std::process::exit; @@ -17,7 +17,7 @@ use crate::args::Args; #[tokio::main] async fn main() { let cli = Cli::new(Args::parse()); - if let Err(err) = cli.run().await { + if let Err(err) = cli.exec().await { eprintln!("Command Failed."); eprintln!("Error: {err}"); exit(-1); diff --git a/core/cli/src/node.rs b/core/cli/src/types.rs similarity index 100% rename from core/cli/src/node.rs rename to core/cli/src/types.rs