cl & deps++ (#6582)

* cl & deps++

* Use PersistentPreRunE

* revert x/bank/client/cli/tx.go

* move to root level

* Use block mode by default

* Skip x/auth CLI tests
This commit is contained in:
Alexander Bezobchuk
2020-07-02 19:35:42 +00:00
committed by GitHub
parent cbb3dca78b
commit dacbcef54d
5 changed files with 23 additions and 19 deletions
+7 -9
View File
@@ -27,7 +27,8 @@ var (
WithTxGenerator(encodingConfig.TxGenerator).
WithCodec(encodingConfig.Amino).
WithInput(os.Stdin).
WithAccountRetriever(types.NewAccountRetriever(encodingConfig.Marshaler))
WithAccountRetriever(types.NewAccountRetriever(encodingConfig.Marshaler)).
WithBroadcastMode(flags.BroadcastBlock)
)
func init() {
@@ -50,6 +51,9 @@ func main() {
rootCmd := &cobra.Command{
Use: "simcli",
Short: "Command line interface for interacting with simapp",
PersistentPreRunE: func(cmd *cobra.Command, _ []string) error {
return client.SetCmdClientContextHandler(initClientCtx, cmd)
},
}
rootCmd.PersistentFlags().String(flags.FlagChainID, "", "network chain ID")
@@ -84,10 +88,7 @@ func queryCmd() *cobra.Command {
Short: "Querying subcommands",
DisableFlagParsing: true,
SuggestionsMinimumDistance: 2,
PreRunE: func(cmd *cobra.Command, _ []string) error {
return client.SetCmdClientContextHandler(initClientCtx, cmd)
},
RunE: client.ValidateCmd,
RunE: client.ValidateCmd,
}
queryCmd.AddCommand(
@@ -111,10 +112,7 @@ func txCmd() *cobra.Command {
Short: "Transactions subcommands",
DisableFlagParsing: true,
SuggestionsMinimumDistance: 2,
PreRunE: func(cmd *cobra.Command, _ []string) error {
return client.SetCmdClientContextHandler(initClientCtx, cmd)
},
RunE: client.ValidateCmd,
RunE: client.ValidateCmd,
}
txCmd.AddCommand(