Merge PR #6968: fix sign command
This commit is contained in:
parent
fe8c8b83aa
commit
89097a00d7
|
@ -9,7 +9,7 @@ import (
|
||||||
"github.com/spf13/cast"
|
"github.com/spf13/cast"
|
||||||
"github.com/spf13/cobra"
|
"github.com/spf13/cobra"
|
||||||
abci "github.com/tendermint/tendermint/abci/types"
|
abci "github.com/tendermint/tendermint/abci/types"
|
||||||
"github.com/tendermint/tendermint/libs/cli"
|
tmcli "github.com/tendermint/tendermint/libs/cli"
|
||||||
"github.com/tendermint/tendermint/libs/log"
|
"github.com/tendermint/tendermint/libs/log"
|
||||||
tmtypes "github.com/tendermint/tendermint/types"
|
tmtypes "github.com/tendermint/tendermint/types"
|
||||||
dbm "github.com/tendermint/tm-db"
|
dbm "github.com/tendermint/tm-db"
|
||||||
|
@ -69,7 +69,7 @@ func Execute() error {
|
||||||
ctx = context.WithValue(ctx, client.ClientContextKey, &client.Context{})
|
ctx = context.WithValue(ctx, client.ClientContextKey, &client.Context{})
|
||||||
ctx = context.WithValue(ctx, server.ServerContextKey, server.NewDefaultContext())
|
ctx = context.WithValue(ctx, server.ServerContextKey, server.NewDefaultContext())
|
||||||
|
|
||||||
executor := cli.PrepareBaseCmd(rootCmd, "", simapp.DefaultNodeHome)
|
executor := tmcli.PrepareBaseCmd(rootCmd, "", simapp.DefaultNodeHome)
|
||||||
return executor.ExecuteContext(ctx)
|
return executor.ExecuteContext(ctx)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -83,7 +83,7 @@ func init() {
|
||||||
genutilcli.GenTxCmd(simapp.ModuleBasics, encodingConfig.TxConfig, banktypes.GenesisBalancesIterator{}, simapp.DefaultNodeHome),
|
genutilcli.GenTxCmd(simapp.ModuleBasics, encodingConfig.TxConfig, banktypes.GenesisBalancesIterator{}, simapp.DefaultNodeHome),
|
||||||
genutilcli.ValidateGenesisCmd(simapp.ModuleBasics, encodingConfig.TxConfig),
|
genutilcli.ValidateGenesisCmd(simapp.ModuleBasics, encodingConfig.TxConfig),
|
||||||
AddGenesisAccountCmd(simapp.DefaultNodeHome),
|
AddGenesisAccountCmd(simapp.DefaultNodeHome),
|
||||||
cli.NewCompletionCmd(rootCmd, true),
|
tmcli.NewCompletionCmd(rootCmd, true),
|
||||||
testnetCmd(simapp.ModuleBasics, banktypes.GenesisBalancesIterator{}),
|
testnetCmd(simapp.ModuleBasics, banktypes.GenesisBalancesIterator{}),
|
||||||
debug.Cmd(),
|
debug.Cmd(),
|
||||||
)
|
)
|
||||||
|
|
|
@ -186,7 +186,6 @@ be generated via the 'multisign' command.
|
||||||
cmd.Flags().Bool(flagAppend, true, "Append the signature to the existing ones. If disabled, old signatures would be overwritten. Ignored if --multisig is on")
|
cmd.Flags().Bool(flagAppend, true, "Append the signature to the existing ones. If disabled, old signatures would be overwritten. Ignored if --multisig is on")
|
||||||
cmd.Flags().Bool(flagSigOnly, false, "Print only the generated signature, then exit")
|
cmd.Flags().Bool(flagSigOnly, false, "Print only the generated signature, then exit")
|
||||||
cmd.Flags().String(flags.FlagOutputDocument, "", "The document will be written to the given file instead of STDOUT")
|
cmd.Flags().String(flags.FlagOutputDocument, "", "The document will be written to the given file instead of STDOUT")
|
||||||
cmd.Flags().String(flags.FlagHome, "", "The application home directory")
|
|
||||||
cmd.Flags().String(flags.FlagChainID, "", "The network chain ID")
|
cmd.Flags().String(flags.FlagChainID, "", "The network chain ID")
|
||||||
cmd.MarkFlagRequired(flags.FlagFrom)
|
cmd.MarkFlagRequired(flags.FlagFrom)
|
||||||
flags.AddTxFlagsToCmd(cmd)
|
flags.AddTxFlagsToCmd(cmd)
|
||||||
|
|
|
@ -4,11 +4,12 @@ import (
|
||||||
"fmt"
|
"fmt"
|
||||||
"strings"
|
"strings"
|
||||||
|
|
||||||
"github.com/cosmos/cosmos-sdk/testutil"
|
tmcli "github.com/tendermint/tendermint/libs/cli"
|
||||||
|
|
||||||
"github.com/cosmos/cosmos-sdk/client"
|
"github.com/cosmos/cosmos-sdk/client"
|
||||||
"github.com/cosmos/cosmos-sdk/client/flags"
|
"github.com/cosmos/cosmos-sdk/client/flags"
|
||||||
"github.com/cosmos/cosmos-sdk/crypto/keyring"
|
"github.com/cosmos/cosmos-sdk/crypto/keyring"
|
||||||
|
"github.com/cosmos/cosmos-sdk/testutil"
|
||||||
clitestutil "github.com/cosmos/cosmos-sdk/testutil/cli"
|
clitestutil "github.com/cosmos/cosmos-sdk/testutil/cli"
|
||||||
"github.com/cosmos/cosmos-sdk/x/auth/client/cli"
|
"github.com/cosmos/cosmos-sdk/x/auth/client/cli"
|
||||||
)
|
)
|
||||||
|
@ -24,7 +25,10 @@ func TxSignExec(clientCtx client.Context, from fmt.Stringer, filename string, ex
|
||||||
|
|
||||||
args = append(args, extraArgs...)
|
args = append(args, extraArgs...)
|
||||||
|
|
||||||
return clitestutil.ExecTestCLICmd(clientCtx, cli.GetSignCommand(), args)
|
cmd := cli.GetSignCommand()
|
||||||
|
tmcli.PrepareBaseCmd(cmd, "", "")
|
||||||
|
|
||||||
|
return clitestutil.ExecTestCLICmd(clientCtx, cmd, args)
|
||||||
}
|
}
|
||||||
|
|
||||||
func TxBroadcastExec(clientCtx client.Context, filename string, extraArgs ...string) (testutil.BufferWriter, error) {
|
func TxBroadcastExec(clientCtx client.Context, filename string, extraArgs ...string) (testutil.BufferWriter, error) {
|
||||||
|
|
Loading…
Reference in New Issue