fix(client,server): consistently set env prefix between client/server (#18345)
This commit is contained in:
+3
-10
@@ -147,20 +147,13 @@ API services are enabled via the 'grpc-only' flag. In this mode, CometBFT is
|
||||
bypassed and can be used when legacy queries are needed after an on-chain upgrade
|
||||
is performed. Note, when enabled, gRPC will also be automatically enabled.
|
||||
`,
|
||||
PreRunE: func(cmd *cobra.Command, _ []string) error {
|
||||
RunE: func(cmd *cobra.Command, _ []string) error {
|
||||
serverCtx := GetServerContextFromCmd(cmd)
|
||||
|
||||
// Bind flags to the Context's Viper so the app construction can set
|
||||
// options accordingly.
|
||||
if err := serverCtx.Viper.BindPFlags(cmd.Flags()); err != nil {
|
||||
_, err := GetPruningOptionsFromFlags(serverCtx.Viper)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
_, err := GetPruningOptionsFromFlags(serverCtx.Viper)
|
||||
return err
|
||||
},
|
||||
RunE: func(cmd *cobra.Command, _ []string) error {
|
||||
serverCtx := GetServerContextFromCmd(cmd)
|
||||
clientCtx, err := client.GetClientQueryContext(cmd)
|
||||
if err != nil {
|
||||
return err
|
||||
|
||||
Reference in New Issue
Block a user