Merge PR #2874: gaiad gentx subcommands refactoring
* gaiad gentx subcommands refactoring - Replace STDIN/STDOUT redirection in `gaiad gentx` with subcommands command line options to redirect streams to file since viper does not handle redirection well. - Use `BuildCreateValidatorMsg` to build a `MsgCreateValidator` rather than redirecting to `gaiacli tx stake create-validator`. - `PrintUnsignedStdTx` now takes an `io.Writer` object. - Mark `--pubkey`, `--amount` and `--moniker` as required flags instead of validating them manually. - Use stake.NewDescription() to make a new Description - ref #2835 * Refresh PENDING.md
This commit is contained in:
committed by
Christopher Goes
parent
1ea0e4c457
commit
3e68e44063
@@ -7,6 +7,7 @@ import (
|
||||
sdk "github.com/cosmos/cosmos-sdk/types"
|
||||
authtxb "github.com/cosmos/cosmos-sdk/x/auth/client/txbuilder"
|
||||
"github.com/cosmos/cosmos-sdk/x/slashing"
|
||||
"os"
|
||||
|
||||
"github.com/spf13/cobra"
|
||||
)
|
||||
@@ -30,7 +31,7 @@ func GetCmdUnjail(cdc *codec.Codec) *cobra.Command {
|
||||
|
||||
msg := slashing.NewMsgUnjail(sdk.ValAddress(valAddr))
|
||||
if cliCtx.GenerateOnly {
|
||||
return utils.PrintUnsignedStdTx(txBldr, cliCtx, []sdk.Msg{msg}, false)
|
||||
return utils.PrintUnsignedStdTx(os.Stdout, txBldr, cliCtx, []sdk.Msg{msg}, false)
|
||||
}
|
||||
return utils.CompleteAndBroadcastTxCli(txBldr, cliCtx, []sdk.Msg{msg})
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user