Skip to content

Commit

Permalink
Use correct Bech32 prefix for show-address command (cosmos#2746)
Browse files Browse the repository at this point in the history
* Use consensus address bech32 prefix
* Update show-address CLI description
  • Loading branch information
alexanderbez authored and jaekwon committed Nov 12, 2018
1 parent bb54a0d commit 811b863
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
1 change: 1 addition & 0 deletions PENDING.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ BUG FIXES
* Gaia CLI (`gaiacli`)

* Gaia
* [\#2723] Use `cosmosvalcons` Bech32 prefix in `tendermint show-address`
* [\#2742](https://github.com/cosmos/cosmos-sdk/issues/2742) Fix time format of TimeoutCommit override

* 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

0 comments on commit 811b863

Please sign in to comment.