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

[R4R] Use correct Bech32 prefix for show-address command #2746

Merged
merged 4 commits into from
Nov 12, 2018
Merged
Show file tree
Hide file tree
Changes from 3 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 @@ -46,6 +46,7 @@ BUG FIXES
* Gaia CLI (`gaiacli`)

* Gaia
* \#2723 Use `cosmosvalcons` Bech32 prefix in `tendermint show-address`

* SDK

Expand Down
8 changes: 4 additions & 4 deletions server/tm_cmds.go
Original file line number Diff line number Diff line change
Expand Up @@ -63,17 +63,17 @@ func ShowValidatorCmd(ctx *Context) *cobra.Command {
func ShowAddressCmd(ctx *Context) *cobra.Command {
cmd := &cobra.Command{
Use: "show-address",
Short: "Shows this node's tendermint validator address",
Short: "Shows this node's tendermint validator consensus address",
RunE: func(cmd *cobra.Command, args []string) error {
cfg := ctx.Config
privValidator := pvm.LoadOrGenFilePV(cfg.PrivValidatorFile())
valAddr := (sdk.ValAddress)(privValidator.Address)
valConsAddr := (sdk.ConsAddress)(privValidator.Address)

if viper.GetBool(client.FlagJson) {
return printlnJSON(valAddr)
return printlnJSON(valConsAddr)
}

fmt.Println(valAddr.String())
fmt.Println(valConsAddr.String())
return nil
},
}
Expand Down