Use correct Bech32 prefix for show-address command (#2746)
* Use consensus address bech32 prefix * Update show-address CLI description
This commit is contained in:
parent
bb54a0de12
commit
811b863677
|
@ -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
|
||||
|
|
|
@ -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
|
||||
},
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue