Skip to content

Commit

Permalink
no need app.toml config read
Browse files Browse the repository at this point in the history
  • Loading branch information
hieuvubk committed Aug 29, 2024
1 parent 3bd4f72 commit e3a98f3
Showing 1 changed file with 0 additions and 16 deletions.
16 changes: 0 additions & 16 deletions server/v2/cometbft/commands.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ import (
"google.golang.org/protobuf/encoding/protojson"
"sigs.k8s.io/yaml"

serverv2 "cosmossdk.io/server/v2"
"cosmossdk.io/server/v2/cometbft/client/rpc"

"github.com/cosmos/cosmos-sdk/client"
Expand All @@ -29,21 +28,6 @@ import (
)

func rpcClient(cmd *cobra.Command) (rpc.CometRPC, error) {
v := client.GetViperFromCmd(cmd)
appTomlConfig := AppTomlConfig{}
if v != nil {
if err := serverv2.UnmarshalSubConfig(v, ServerName, &appTomlConfig); err != nil {
return nil, fmt.Errorf("failed to unmarshal config: %w", err)
}
}
if appTomlConfig.Standalone {
client, err := rpchttp.New(client.GetConfigFromCmd(cmd).RPC.ListenAddress)
if err != nil {
return nil, err
}
return client, nil
}

rpcURI, err := cmd.Flags().GetString(FlagNode)
if err != nil {
return nil, err
Expand Down

0 comments on commit e3a98f3

Please sign in to comment.