Skip to content

Commit

Permalink
chore: update command scripts #30
Browse files Browse the repository at this point in the history
chore: update command scripts #30
  • Loading branch information
DarkingLee authored Oct 6, 2023
2 parents 1e1d1d8 + cac9170 commit 5492c90
Showing 1 changed file with 12 additions and 9 deletions.
21 changes: 12 additions & 9 deletions node/src/command.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand All @@ -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 {
Expand All @@ -40,15 +40,17 @@ impl SubstrateCli for Cli {

fn load_spec(&self, id: &str) -> std::result::Result<Box<dyn sc_service::ChainSpec>, 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)
}
Expand Down Expand Up @@ -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::<Block, service::ExecutorDispatch>(config)
Expand Down Expand Up @@ -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())
},
}
})
},
Expand Down

0 comments on commit 5492c90

Please sign in to comment.