From 17ce936b6d1add26a57a691e607667097b905b5f Mon Sep 17 00:00:00 2001 From: DarkingLee Date: Fri, 6 Oct 2023 20:35:57 +0800 Subject: [PATCH] chore: update command scripts --- node/src/command.rs | 21 ++++++++++++--------- 1 file changed, 12 insertions(+), 9 deletions(-) diff --git a/node/src/command.rs b/node/src/command.rs index 434a355..b6928ec 100644 --- a/node/src/command.rs +++ b/node/src/command.rs @@ -15,7 +15,7 @@ use try_runtime_cli::block_building_info::timestamp_with_aura_info; impl SubstrateCli for Cli { fn impl_name() -> String { - "Substrate Node".into() + "Melodot Node".into() } fn impl_version() -> String { @@ -31,7 +31,7 @@ impl SubstrateCli for Cli { } fn support_url() -> String { - "support.anonymous.an".into() + "https://github.com/ZeroDAO/melodot/issues/new".into() } fn copyright_start_year() -> i32 { @@ -40,15 +40,17 @@ impl SubstrateCli for Cli { fn load_spec(&self, id: &str) -> std::result::Result, String> { let spec = match id { - "" => + "" => { return Err( "Please specify which chain you want to run, e.g. --dev or --chain=local" .into(), - ), + ) + }, "dev" => Box::new(chain_spec::development_config()), "local" => Box::new(chain_spec::local_testnet_config()), - path => - Box::new(chain_spec::ChainSpec::from_json_file(std::path::PathBuf::from(path))?), + path => { + Box::new(chain_spec::ChainSpec::from_json_file(std::path::PathBuf::from(path))?) + }, }; Ok(spec) } @@ -127,7 +129,7 @@ pub fn run() -> sc_cli::Result<()> { "Runtime benchmarking wasn't enabled when building the node. \ You can enable it with `--features runtime-benchmarks`." .into(), - ) + ); } cmd.run::(config) @@ -176,8 +178,9 @@ pub fn run() -> sc_cli::Result<()> { cmd.run(client, inherent_benchmark_data()?, Vec::new(), &ext_factory) }, - BenchmarkCmd::Machine(cmd) => - cmd.run(&config, SUBSTRATE_REFERENCE_HARDWARE.clone()), + BenchmarkCmd::Machine(cmd) => { + cmd.run(&config, SUBSTRATE_REFERENCE_HARDWARE.clone()) + }, } }) },