diff --git a/README.md b/README.md index 55b3a9a054..c194f8479c 100644 --- a/README.md +++ b/README.md @@ -159,7 +159,7 @@ ex -sc '%s/"data_dir": "default"/"data_dir": "node2"/|x' nodes/node2.json Then start the new node using the new config file ```shell -target/release/ckb -c nodes/node2.json run +target/release/ckb run -c nodes/node2.json ``` The option `ckb.chain` configures the chain spec. It accepts a path to the spec JSON file. The directory `nodes_template/spec` has all the pre-defined specs. Please note that nodes with different chain specs may fail to connect with each other. diff --git a/src/main.rs b/src/main.rs index 67e198e62e..31e790c7df 100644 --- a/src/main.rs +++ b/src/main.rs @@ -14,16 +14,16 @@ fn main() { match matches.subcommand() { ("cli", Some(cli_matches)) => match cli_matches.subcommand() { - ("type_hash", _) => cli::type_hash(&setup(&matches)), + ("type_hash", _) => cli::type_hash(&setup(&cli_matches)), ("keygen", _) => cli::keygen(), _ => unreachable!(), }, - ("run", Some(_)) => { - cli::run(setup(&matches)); + ("run", Some(run_matches)) => { + cli::run(setup(&run_matches)); } - ("miner", Some(_)) => cli::miner(&matches), - ("export", Some(export_matches)) => cli::export(&setup(&matches), export_matches), - ("import", Some(import_matches)) => cli::import(&setup(&matches), import_matches), + ("miner", Some(miner_matches)) => cli::miner(&miner_matches), + ("export", Some(export_matches)) => cli::export(&setup(&export_matches), export_matches), + ("import", Some(import_matches)) => cli::import(&setup(&import_matches), import_matches), _ => unreachable!(), }