-
Notifications
You must be signed in to change notification settings - Fork 236
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(config): Simplify config and data dir parsing (#19)
BREAKING CHANGE: Command line arguments and some config options and chan spec options have been changed. It may break scripts and integration tests that depends on the command line interface. - Command line argument `--config|-c` is now a top option, which should be specified before sub-command. - Remove command line arguments `--data-dir` and `--chain`. They should be configured via the config file. - Add a new config option `data_dir`, which configures the path of data directory. - Option `ckb.chain` now only accepts a path. - Option `system_cells` in chain spec now only accepts paths. The path `data_dir` and `ckb.chain` can be an absolute path, or relative to the directory containing the config file. The paths of `system_cells` in chain spec can be absolute, or relative to the directory containing the chain spec file. If `--config|-c` is omitted, the app tries `ckb.json`, `nodes/default.json` in order. It is recommended to use `nodes/default.json` for development, which can be created by copying `nodes/default.example.json`. The default config saves data in `nodes/default/`, and loads chains spec `nodes/spec/dev.json`. Following locations are obsoleted data directories, which can be removed on development machines: - Linux - `$XDG_DATA_HOME/ckb` - `$XDG_DATA_HOME/NervosDev` - `$HOME/.local/share/ckb` - `$HOME/.local/share/NervosDev` - macOS - `$HOME/Library/Application Support/ckb` - `$HOME/Library/Application Support/NervosDev`
- Loading branch information
Showing
21 changed files
with
229 additions
and
469 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -36,5 +36,5 @@ tags | |
# vagrant file | ||
.vagrant | ||
|
||
# nervos runtime folder | ||
.nervos | ||
# runtime folder | ||
/nodes/ |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.