Merge PR #2786: Fix redelegation command follow up to #2727

* Fix redelegation command
* Add pending entry
This commit is contained in:
Christopher Goes 2018-11-12 22:18:38 +01:00 committed by GitHub
commit 4177f3063a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 18 deletions

View File

@ -6,6 +6,7 @@ BREAKING CHANGES
* Gaia CLI (`gaiacli`)
* [cli] [\#2727](https://github.com/cosmos/cosmos-sdk/pull/2727) Fix unbonding command flow
* [cli] [\#2786](https://github.com/cosmos/cosmos-sdk/pull/2786) Fix redelegation command flow
* Gaia
@ -53,8 +54,8 @@ BUG FIXES
* 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
* [\#2742](https://github.com/cosmos/cosmos-sdk/issues/2742) Fix time format of TimeoutCommit override
* SDK
* Tendermint

View File

@ -211,26 +211,11 @@ func GetCmdDelegate(cdc *codec.Codec) *cobra.Command {
return cmd
}
// GetCmdRedelegate implements the redelegate validator command.
// GetCmdRedelegate the begin redelegation command.
func GetCmdRedelegate(storeName string, cdc *codec.Codec) *cobra.Command {
cmd := &cobra.Command{
Use: "redelegate",
Short: "redelegate illiquid tokens from one validator to another",
}
cmd.AddCommand(
client.PostCommands(
GetCmdBeginRedelegate(storeName, cdc),
)...)
return cmd
}
// GetCmdBeginRedelegate the begin redelegation command.
func GetCmdBeginRedelegate(storeName string, cdc *codec.Codec) *cobra.Command {
cmd := &cobra.Command{
Use: "begin",
Short: "begin redelegation",
RunE: func(cmd *cobra.Command, args []string) error {
txBldr := authtxb.NewTxBuilderFromCLI().WithCodec(cdc)
cliCtx := context.NewCLIContext().