Skip to content

Commit

Permalink
fix: cli arg matches
Browse files Browse the repository at this point in the history
  • Loading branch information
zhangsoledad committed Jan 23, 2019
1 parent 55e682e commit 36902c3
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
12 changes: 6 additions & 6 deletions src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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!(),
}

Expand Down

0 comments on commit 36902c3

Please sign in to comment.