Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Change _ to - in all CLI commands #1984

Merged
merged 1 commit into from
Aug 14, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions PENDING.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ BREAKING CHANGES
* [types] sdk.NewCoin now takes sdk.Int, sdk.NewInt64Coin takes int64
* [cli] #1551: Officially removed `--name` from CLI commands
* [cli] Genesis/key creation (`init`) now supports user-provided key passwords
* [cli] unsafe_reset_all, show_validator, and show_node_id have been renamed to unsafe-reset-all, show-validator, and show-node-id

FEATURES
* [lcd] Can now query governance proposals by ProposalStatus
Expand Down
6 changes: 3 additions & 3 deletions cmd/gaia/cli_test/cli_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ func init() {
}

func TestGaiaCLISend(t *testing.T) {
tests.ExecuteT(t, fmt.Sprintf("gaiad --home=%s unsafe_reset_all", gaiadHome), "")
tests.ExecuteT(t, fmt.Sprintf("gaiad --home=%s unsafe-reset-all", gaiadHome), "")
executeWrite(t, fmt.Sprintf("gaiacli keys delete --home=%s foo", gaiacliHome), app.DefaultKeyPass)
executeWrite(t, fmt.Sprintf("gaiacli keys delete --home=%s bar", gaiacliHome), app.DefaultKeyPass)

Expand Down Expand Up @@ -87,7 +87,7 @@ func TestGaiaCLISend(t *testing.T) {
}

func TestGaiaCLICreateValidator(t *testing.T) {
tests.ExecuteT(t, fmt.Sprintf("gaiad --home=%s unsafe_reset_all", gaiadHome), "")
tests.ExecuteT(t, fmt.Sprintf("gaiad --home=%s unsafe-reset-all", gaiadHome), "")
executeWrite(t, fmt.Sprintf("gaiacli keys delete --home=%s foo", gaiacliHome), app.DefaultKeyPass)
executeWrite(t, fmt.Sprintf("gaiacli keys delete --home=%s bar", gaiacliHome), app.DefaultKeyPass)
chainID := executeInit(t, fmt.Sprintf("gaiad init -o --name=foo --home=%s --home-client=%s", gaiadHome, gaiacliHome))
Expand Down Expand Up @@ -153,7 +153,7 @@ func TestGaiaCLICreateValidator(t *testing.T) {
}

func TestGaiaCLISubmitProposal(t *testing.T) {
tests.ExecuteT(t, fmt.Sprintf("gaiad --home=%s unsafe_reset_all", gaiadHome), "")
tests.ExecuteT(t, fmt.Sprintf("gaiad --home=%s unsafe-reset-all", gaiadHome), "")
executeWrite(t, fmt.Sprintf("gaiacli keys delete --home=%s foo", gaiacliHome), app.DefaultKeyPass)
executeWrite(t, fmt.Sprintf("gaiacli keys delete --home=%s bar", gaiacliHome), app.DefaultKeyPass)
chainID := executeInit(t, fmt.Sprintf("gaiad init -o --name=foo --home=%s --home-client=%s", gaiadHome, gaiacliHome))
Expand Down
2 changes: 1 addition & 1 deletion docs/getting-started/full-node.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ First, remove the outdated files and reset the data.

```bash
rm $HOME/.gaiad/config/addrbook.json $HOME/.gaiad/config/genesis.json
gaiad unsafe_reset_all
gaiad unsafe-reset-all
```

Your node is now in a pristine state while keeping the original `priv_validator.json` and `config.toml`. If you had any sentry nodes or full nodes setup before,
Expand Down
10 changes: 5 additions & 5 deletions docs/sdk/clients.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ There are three types of key representations that are used:

- `cosmosvalpub`
- Generated when the node is created with `gaiad init`.
- Get this value with `gaiad tendermint show_validator`
- Get this value with `gaiad tendermint show-validator`
- e.g. `cosmosvalpub1zcjduc3qcyj09qc03elte23zwshdx92jm6ce88fgc90rtqhjx8v0608qh5ssp0w94c`

### Generate Keys
Expand Down Expand Up @@ -59,7 +59,7 @@ gaiacli keys list
View the validator pubkey for your node by typing:

```bash
gaiad tendermint show_validator
gaiad tendermint show-validator
```

::: danger Warning
Expand Down Expand Up @@ -120,7 +120,7 @@ On the testnet, we delegate `steak` instead of `atom`. Here's how you can bond t
```bash
gaiacli stake delegate \
--amount=10steak \
--address-validator=$(gaiad tendermint show_validator) \
--address-validator=$(gaiad tendermint show-validator) \
--name=<key_name> \
--chain-id=gaia-7005
```
Expand All @@ -137,7 +137,7 @@ If for any reason the validator misbehaves, or you want to unbond a certain amou

```bash
gaiacli stake unbond begin \
--address-validator=$(gaiad tendermint show_validator) \
--address-validator=$(gaiad tendermint show-validator) \
--shares=MAX \
--name=<key_name> \
--chain-id=gaia-7005
Expand All @@ -152,7 +152,7 @@ gaiacli account <account_cosmosaccaddr>

gaiacli stake delegation \
--address-delegator=<account_cosmosaccaddr> \
--address-validator=$(gaiad tendermint show_validator) \
--address-validator=$(gaiad tendermint show-validator) \
--chain-id=gaia-7005
```

Expand Down
6 changes: 3 additions & 3 deletions docs/validators/validator-setup.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ If you want to become a validator for the Hub's `mainnet`, you should [research
Your `cosmosvalpub` can be used to create a new validator by staking tokens. You can find your validator pubkey by running:

```bash
gaiad tendermint show_validator
gaiad tendermint show-validator
```

Next, craft your `gaiacli stake create-validator` command:
Expand All @@ -31,7 +31,7 @@ Don't use more `steak` thank you have! You can always get more by using the [Fau
```bash
gaiacli stake create-validator \
--amount=5steak \
--pubkey=$(gaiad tendermint show_validator) \
--pubkey=$(gaiad tendermint show-validator) \
--address-validator=<account_cosmosaccaddr>
--moniker="choose a moniker" \
--chain-id=gaia-7005 \
Expand Down Expand Up @@ -70,7 +70,7 @@ gaiacli stake validator \
Your validator is active if the following command returns anything:

```bash
gaiacli advanced tendermint validator-set | grep "$(gaiad tendermint show_validator)"
gaiacli advanced tendermint validator-set | grep "$(gaiad tendermint show-validator)"
```

You should also be able to see your validator on the [Explorer](https://explorecosmos.network/validators). You are looking for the `bech32` encoded `address` in the `~/.gaiad/config/priv_validator.json` file.
Expand Down
2 changes: 1 addition & 1 deletion examples/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,7 @@ starting this tutorial again or trying something new), the following
commands are run:

```
basecoind unsafe_reset_all
basecoind unsafe-reset-all
rm -rf ~/.basecoind
rm -rf ~/.basecli
```
Expand Down
2 changes: 1 addition & 1 deletion networks/remote/ansible/roles/upgrade-gaiad/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,6 @@

- name: Reset network
when: UNSAFE_RESET_ALL | default(false) | bool
command: "sudo -u gaiad gaiad unsafe_reset_all"
command: "sudo -u gaiad gaiad unsafe-reset-all"
notify: restart gaiad

6 changes: 3 additions & 3 deletions server/tm_cmds.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ import (
// ShowNodeIDCmd - ported from Tendermint, dump node ID to stdout
func ShowNodeIDCmd(ctx *Context) *cobra.Command {
return &cobra.Command{
Use: "show_node_id",
Use: "show-node-id",
Short: "Show this node's ID",
RunE: func(cmd *cobra.Command, args []string) error {
cfg := ctx.Config
Expand All @@ -34,7 +34,7 @@ func ShowNodeIDCmd(ctx *Context) *cobra.Command {
func ShowValidatorCmd(ctx *Context) *cobra.Command {
flagJSON := "json"
cmd := cobra.Command{
Use: "show_validator",
Use: "show-validator",
Short: "Show this node's tendermint validator info",
RunE: func(cmd *cobra.Command, args []string) error {

Expand Down Expand Up @@ -68,7 +68,7 @@ func ShowValidatorCmd(ctx *Context) *cobra.Command {
// UnsafeResetAllCmd - extension of the tendermint command, resets initialization
func UnsafeResetAllCmd(ctx *Context) *cobra.Command {
return &cobra.Command{
Use: "unsafe_reset_all",
Use: "unsafe-reset-all",
Short: "Reset blockchain database, priv_validator.json file, and the logger",
RunE: func(cmd *cobra.Command, args []string) error {
cfg := ctx.Config
Expand Down