merged in master
This commit is contained in:
+11
-4
@@ -14,6 +14,7 @@ import (
|
||||
|
||||
"github.com/cosmos/cosmos-sdk/baseapp"
|
||||
"github.com/cosmos/cosmos-sdk/client"
|
||||
config "github.com/cosmos/cosmos-sdk/client/config"
|
||||
"github.com/cosmos/cosmos-sdk/client/debug"
|
||||
"github.com/cosmos/cosmos-sdk/client/flags"
|
||||
"github.com/cosmos/cosmos-sdk/client/keys"
|
||||
@@ -25,7 +26,6 @@ import (
|
||||
"github.com/cosmos/cosmos-sdk/snapshots"
|
||||
"github.com/cosmos/cosmos-sdk/store"
|
||||
sdk "github.com/cosmos/cosmos-sdk/types"
|
||||
authclient "github.com/cosmos/cosmos-sdk/x/auth/client"
|
||||
authcmd "github.com/cosmos/cosmos-sdk/x/auth/client/cli"
|
||||
"github.com/cosmos/cosmos-sdk/x/auth/types"
|
||||
vestingcli "github.com/cosmos/cosmos-sdk/x/auth/vesting/client/cli"
|
||||
@@ -46,12 +46,20 @@ func NewRootCmd() (*cobra.Command, params.EncodingConfig) {
|
||||
WithInput(os.Stdin).
|
||||
WithAccountRetriever(types.AccountRetriever{}).
|
||||
WithBroadcastMode(flags.BroadcastBlock).
|
||||
WithHomeDir(simapp.DefaultNodeHome)
|
||||
WithHomeDir(simapp.DefaultNodeHome).
|
||||
WithViper()
|
||||
|
||||
rootCmd := &cobra.Command{
|
||||
Use: "simd",
|
||||
Short: "simulation app",
|
||||
PersistentPreRunE: func(cmd *cobra.Command, _ []string) error {
|
||||
initClientCtx = client.ReadHomeFlag(initClientCtx, cmd)
|
||||
|
||||
initClientCtx, err := config.ReadFromClientConfig(initClientCtx)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
if err := client.SetCmdClientContextHandler(initClientCtx, cmd); err != nil {
|
||||
return err
|
||||
}
|
||||
@@ -66,8 +74,6 @@ func NewRootCmd() (*cobra.Command, params.EncodingConfig) {
|
||||
}
|
||||
|
||||
func initRootCmd(rootCmd *cobra.Command, encodingConfig params.EncodingConfig) {
|
||||
authclient.Codec = encodingConfig.Marshaler
|
||||
|
||||
rootCmd.AddCommand(
|
||||
genutilcli.InitCmd(simapp.ModuleBasics, simapp.DefaultNodeHome),
|
||||
genutilcli.CollectGenTxsCmd(banktypes.GenesisBalancesIterator{}, simapp.DefaultNodeHome),
|
||||
@@ -78,6 +84,7 @@ func initRootCmd(rootCmd *cobra.Command, encodingConfig params.EncodingConfig) {
|
||||
tmcli.NewCompletionCmd(rootCmd, true),
|
||||
testnetCmd(simapp.ModuleBasics, banktypes.GenesisBalancesIterator{}),
|
||||
debug.Cmd(),
|
||||
config.Cmd(),
|
||||
)
|
||||
|
||||
a := appCreator{encodingConfig}
|
||||
|
||||
Reference in New Issue
Block a user