From fe8c8b83aa653e2918b2f21f6e41cb0177fefa91 Mon Sep 17 00:00:00 2001 From: Jonathan Gimeno Date: Thu, 6 Aug 2020 16:58:41 +0200 Subject: [PATCH] add default node home into server helpers (#6962) --- go.sum | 2 -- server/util.go | 7 +++---- simapp/simd/cmd/root.go | 2 +- 3 files changed, 4 insertions(+), 7 deletions(-) diff --git a/go.sum b/go.sum index 96bde8839261..e0a891decfb7 100644 --- a/go.sum +++ b/go.sum @@ -514,8 +514,6 @@ github.com/tendermint/tendermint v0.33.2 h1:NzvRMTuXJxqSsFed2J7uHmMU5N1CVzSpfi3n github.com/tendermint/tendermint v0.33.2/go.mod h1:25DqB7YvV1tN3tHsjWoc2vFtlwICfrub9XO6UBO+4xk= github.com/tendermint/tendermint v0.33.5 h1:jYgRd9ImkzA9iOyhpmgreYsqSB6tpDa6/rXYPb8HKE8= github.com/tendermint/tendermint v0.33.5/go.mod h1:0yUs9eIuuDq07nQql9BmI30FtYGcEC60Tu5JzB5IezM= -github.com/tendermint/tendermint v0.33.6 h1:W4UOsXY4ROJZ3TLLGVVv71VXD4WK2gJRb3gzeced+mg= -github.com/tendermint/tendermint v0.33.6/go.mod h1:0yUs9eIuuDq07nQql9BmI30FtYGcEC60Tu5JzB5IezM= github.com/tendermint/tendermint v0.33.7 h1:b5CQD8ggDtl4u0EbXzabi0MaOw9NrcXker6ijEkAE74= github.com/tendermint/tendermint v0.33.7/go.mod h1:0yUs9eIuuDq07nQql9BmI30FtYGcEC60Tu5JzB5IezM= github.com/tendermint/tm-db v0.4.1/go.mod h1:JsJ6qzYkCGiGwm5GHl/H5GLI9XLb6qZX7PRe425dHAY= diff --git a/server/util.go b/server/util.go index 6eaf234240ab..7db8742d38b9 100644 --- a/server/util.go +++ b/server/util.go @@ -24,7 +24,6 @@ import ( "github.com/cosmos/cosmos-sdk/codec" "github.com/cosmos/cosmos-sdk/server/config" "github.com/cosmos/cosmos-sdk/server/types" - "github.com/cosmos/cosmos-sdk/simapp" sdk "github.com/cosmos/cosmos-sdk/types" "github.com/cosmos/cosmos-sdk/version" ) @@ -169,7 +168,7 @@ func interceptConfigs(ctx *Context, rootViper *viper.Viper) (*tmcfg.Config, erro } // add server commands -func AddCommands(rootCmd *cobra.Command, appCreator types.AppCreator, appExport types.AppExporter) { +func AddCommands(rootCmd *cobra.Command, defaultNodeHome string, appCreator types.AppCreator, appExport types.AppExporter) { tendermintCmd := &cobra.Command{ Use: "tendermint", Short: "Tendermint subcommands", @@ -183,11 +182,11 @@ func AddCommands(rootCmd *cobra.Command, appCreator types.AppCreator, appExport ) rootCmd.AddCommand( - StartCmd(appCreator, simapp.DefaultNodeHome), + StartCmd(appCreator, defaultNodeHome), UnsafeResetAllCmd(), flags.LineBreak, tendermintCmd, - ExportCmd(appExport, simapp.DefaultNodeHome), + ExportCmd(appExport, defaultNodeHome), flags.LineBreak, version.NewVersionCommand(), ) diff --git a/simapp/simd/cmd/root.go b/simapp/simd/cmd/root.go index adc40a3fbe39..4d72f6725e33 100644 --- a/simapp/simd/cmd/root.go +++ b/simapp/simd/cmd/root.go @@ -88,7 +88,7 @@ func init() { debug.Cmd(), ) - server.AddCommands(rootCmd, newApp, exportAppStateAndTMValidators) + server.AddCommands(rootCmd, simapp.DefaultNodeHome, newApp, exportAppStateAndTMValidators) // add keybase, auxiliary RPC, query, and tx child commands rootCmd.AddCommand(