From 04c2071824bcb9c78b1d306d23f8ee70aed2f38e Mon Sep 17 00:00:00 2001 From: Sherry Ma Date: Fri, 22 Jun 2018 17:48:52 +0800 Subject: [PATCH 1/2] Change the value of tag --address-validator When doing gaiacli stake delegate/unbond/delegation, --address-validator should get the address of the validator, not the validator pubkey. --- cmd/gaia/testnets/README.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/cmd/gaia/testnets/README.md b/cmd/gaia/testnets/README.md index 5b6df83ad3..8cce4822cb 100644 --- a/cmd/gaia/testnets/README.md +++ b/cmd/gaia/testnets/README.md @@ -320,7 +320,7 @@ On the testnet, we delegate `steak` instead of `atom`. Here's how you can bond t gaiacli stake delegate \ --amount=10steak \ --address-delegator= \ - --address-validator=$(gaiad tendermint show_validator) \ + --address-validator= \ --name= \ --chain-id=gaia-6002 ``` @@ -336,7 +336,7 @@ If for any reason the validator misbehaves, or you want to unbond a certain amou ```bash gaiacli stake unbond \ --address-delegator= \ - --address-validator=$(gaiad tendermint show_validator) \ + --address-validator= \ --shares=MAX \ --name= \ --chain-id=gaia-6002 @@ -349,7 +349,7 @@ gaiacli account gaiacli stake delegation \ --address-delegator= \ - --address-validator=$(gaiad tendermint show_validator) \ + --address-validator= \ --chain-id=gaia-6002 ``` From 1a67dc5d7cdc9d02a29038b96e4c7c7e3fcf34d1 Mon Sep 17 00:00:00 2001 From: Sherry Ma Date: Fri, 22 Jun 2018 18:37:15 +0800 Subject: [PATCH 2/2] Changed decode delegator address function In delegation query, the function to decode the address of delegator should be using Bech32 but not Hex --- x/stake/client/cli/query.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/x/stake/client/cli/query.go b/x/stake/client/cli/query.go index 727cddcde2..9ec1edc254 100644 --- a/x/stake/client/cli/query.go +++ b/x/stake/client/cli/query.go @@ -117,7 +117,7 @@ func GetCmdQueryDelegation(storeName string, cdc *wire.Codec) *cobra.Command { return err } - delAddr, err := sdk.GetValAddressHex(viper.GetString(FlagAddressDelegator)) + delAddr, err := sdk.GetAccAddressBech32(viper.GetString(FlagAddressDelegator)) if err != nil { return err }