refactor: rename to CometBFT (#14914)
This commit is contained in:
@@ -3,8 +3,8 @@ package cmd
|
||||
import (
|
||||
"context"
|
||||
|
||||
tmcfg "github.com/cometbft/cometbft/config"
|
||||
tmcli "github.com/cometbft/cometbft/libs/cli"
|
||||
cmtcfg "github.com/cometbft/cometbft/config"
|
||||
cmtcli "github.com/cometbft/cometbft/libs/cli"
|
||||
"github.com/spf13/cobra"
|
||||
|
||||
"github.com/cosmos/cosmos-sdk/client"
|
||||
@@ -20,15 +20,15 @@ func Execute(rootCmd *cobra.Command, envPrefix string, defaultHome string) 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 AccountRetriever, Keyring,
|
||||
// and a Tendermint RPC. This requires the use of a pointer reference when
|
||||
// and a CometBFT 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 := CreateExecuteContext(context.Background())
|
||||
|
||||
rootCmd.PersistentFlags().String(flags.FlagLogLevel, tmcfg.DefaultLogLevel, "The logging level (trace|debug|info|warn|error|fatal|panic)")
|
||||
rootCmd.PersistentFlags().String(flags.FlagLogFormat, tmcfg.LogFormatPlain, "The logging format (json|plain)")
|
||||
rootCmd.PersistentFlags().String(flags.FlagLogLevel, cmtcfg.DefaultLogLevel, "The logging level (trace|debug|info|warn|error|fatal|panic)")
|
||||
rootCmd.PersistentFlags().String(flags.FlagLogFormat, cmtcfg.LogFormatPlain, "The logging format (json|plain)")
|
||||
|
||||
executor := tmcli.PrepareBaseCmd(rootCmd, envPrefix, defaultHome)
|
||||
executor := cmtcli.PrepareBaseCmd(rootCmd, envPrefix, defaultHome)
|
||||
return executor.ExecuteContext(ctx)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user