diff --git a/CHANGELOG.md b/CHANGELOG.md index 934342f4396..b35c716fbf6 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -47,6 +47,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## Minor improvements & Bug Fixes +- [#666](https://github.com/osmosis-labs/osmosis/pull/666) Fix the `--log-level` and `--log-format` commands on `osmosisd start` - [#655](https://github.com/osmosis-labs/osmosis/pull/655) Make the default genesis for pool-incentives work by default - [97ac2a8](https://github.com/osmosis-labs/osmosis/commit/97ac2a86303fc8966a4c169107e0945775107e67) Fix InitGenesis bug for gauges diff --git a/cmd/osmosisd/cmd/root.go b/cmd/osmosisd/cmd/root.go index 2a0fdbd341b..d3d59ff258c 100644 --- a/cmd/osmosisd/cmd/root.go +++ b/cmd/osmosisd/cmd/root.go @@ -1,7 +1,6 @@ package cmd import ( - "context" "io" "os" "path/filepath" @@ -134,22 +133,6 @@ lru_size = 0` return customAppTemplate, customAppConfig } -// Execute executes the root command. -func Execute(rootCmd *cobra.Command) error { - // Create and set a client.Context on the command's Context. During the pre-run - // of the root command, a default initialized client.Context is provided to - // seed child command execution with values such as AccountRetriver, Keyring, - // and a Tendermint RPC. This requires the use of a pointer reference when - // getting and setting the client.Context. Ideally, we utilize - // https://github.com/spf13/cobra/pull/1118. - ctx := context.Background() - ctx = context.WithValue(ctx, client.ClientContextKey, &client.Context{}) - ctx = context.WithValue(ctx, server.ServerContextKey, server.NewDefaultContext()) - - executor := tmcli.PrepareBaseCmd(rootCmd, "", osmosis.DefaultNodeHome) - return executor.ExecuteContext(ctx) -} - func initRootCmd(rootCmd *cobra.Command, encodingConfig params.EncodingConfig) { cfg := sdk.GetConfig() diff --git a/cmd/osmosisd/main.go b/cmd/osmosisd/main.go index ececcd06da4..61ab8b19f96 100644 --- a/cmd/osmosisd/main.go +++ b/cmd/osmosisd/main.go @@ -3,6 +3,9 @@ package main import ( "os" + svrcmd "github.com/cosmos/cosmos-sdk/server/cmd" + + osmosis "github.com/osmosis-labs/osmosis/app" "github.com/osmosis-labs/osmosis/app/params" "github.com/osmosis-labs/osmosis/cmd/osmosisd/cmd" ) @@ -10,7 +13,7 @@ import ( func main() { params.SetAddressPrefixes() rootCmd, _ := cmd.NewRootCmd() - if err := cmd.Execute(rootCmd); err != nil { + if err := svrcmd.Execute(rootCmd, osmosis.DefaultNodeHome); err != nil { os.Exit(1) } }