Skip to content

Commit

Permalink
remove unneeded functions
Browse files Browse the repository at this point in the history
  • Loading branch information
tac0turtle committed Sep 11, 2024
1 parent d211b09 commit 13819f5
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 29 deletions.
2 changes: 1 addition & 1 deletion client/grpc/cmtservice/block.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import (
)

func getBlockHeight(ctx context.Context, rpc CometRPC) (int64, error) {
status, err := GetNodeStatus(ctx, rpc)
status, err := rpc.Status(ctx)
if err != nil {
return 0, err
}
Expand Down
9 changes: 5 additions & 4 deletions client/grpc/cmtservice/service.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,15 @@ package cmtservice
import (
"context"

"cosmossdk.io/core/address"
abci "github.com/cometbft/cometbft/api/cometbft/abci/v1"
gogogrpc "github.com/cosmos/gogoproto/grpc"
gogoprotoany "github.com/cosmos/gogoproto/types/any"
"github.com/grpc-ecosystem/grpc-gateway/runtime"
"google.golang.org/grpc/codes"
"google.golang.org/grpc/status"

"cosmossdk.io/core/address"

"github.com/cosmos/cosmos-sdk/baseapp"
"github.com/cosmos/cosmos-sdk/client"
codectypes "github.com/cosmos/cosmos-sdk/codec/types"
Expand Down Expand Up @@ -49,7 +50,7 @@ func NewQueryServer(

// GetSyncing implements ServiceServer.GetSyncing
func (s queryServer) GetSyncing(ctx context.Context, _ *GetSyncingRequest) (*GetSyncingResponse, error) {
status, err := GetNodeStatus(ctx, s.rpc)
status, err := s.rpc.Status(ctx)
if err != nil {
return nil, err
}
Expand Down Expand Up @@ -163,7 +164,7 @@ func (s queryServer) GetValidatorSetByHeight(ctx context.Context, req *GetValida
}

func ValidatorsOutput(ctx context.Context, rpc CometRPC, consCodec address.Codec, height *int64, page, limit int) (*GetLatestValidatorSetResponse, error) {
vs, err := getValidators(ctx, rpc, height, page, limit)
vs, err := rpc.Validators(ctx, height, &page, &limit)
if err != nil {
return nil, err
}
Expand Down Expand Up @@ -204,7 +205,7 @@ func ValidatorsOutput(ctx context.Context, rpc CometRPC, consCodec address.Codec

// GetNodeInfo implements ServiceServer.GetNodeInfo
func (s queryServer) GetNodeInfo(ctx context.Context, _ *GetNodeInfoRequest) (*GetNodeInfoResponse, error) {
status, err := GetNodeStatus(ctx, s.rpc)
status, err := s.rpc.Status(ctx)
if err != nil {
return nil, err
}
Expand Down
13 changes: 0 additions & 13 deletions client/grpc/cmtservice/status.go

This file was deleted.

11 changes: 0 additions & 11 deletions client/grpc/cmtservice/validator.go

This file was deleted.

0 comments on commit 13819f5

Please sign in to comment.