Skip to content

Commit

Permalink
lint
Browse files Browse the repository at this point in the history
  • Loading branch information
testinginprod committed Jul 29, 2024
1 parent 422ea8d commit 9308ae7
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
9 changes: 4 additions & 5 deletions server/v2/api/grpc/gogoreflection/serverreflection.go
Original file line number Diff line number Diff line change
Expand Up @@ -47,17 +47,17 @@ import (
"strings"
"sync"

"cosmossdk.io/core/log"
gogoproto "github.com/cosmos/gogoproto/proto"
"google.golang.org/protobuf/reflect/protodesc"
"google.golang.org/protobuf/reflect/protoreflect"

// nolint: staticcheck // keep this import for backward compatibility
dpb "github.com/golang/protobuf/protoc-gen-go/descriptor"
"google.golang.org/grpc"
"google.golang.org/grpc/codes"
rpb "google.golang.org/grpc/reflection/grpc_reflection_v1alpha"
"google.golang.org/grpc/status"
"google.golang.org/protobuf/reflect/protodesc"
"google.golang.org/protobuf/reflect/protoreflect"

"cosmossdk.io/core/log"
)

type serverReflectionServer struct {
Expand Down Expand Up @@ -91,7 +91,6 @@ type protoMessage interface {

func (s *serverReflectionServer) getSymbols() (svcNames []string, symbolIndex map[string]*dpb.FileDescriptorProto) {
s.initSymbols.Do(func() {

s.symbols = map[string]*dpb.FileDescriptorProto{}
services, fds := s.getServices(s.methods)
s.serviceNames = services
Expand Down
5 changes: 3 additions & 2 deletions server/v2/api/grpc/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,8 @@ func (s *Server[T]) StartCmdFlags() *pflag.FlagSet {

func makeUnknownServiceHandler(messageMap map[string]func() proto.Message, querier interface {
Query(ctx context.Context, version uint64, msg proto.Message) (proto.Message, error)
}) grpc.StreamHandler {
},
) grpc.StreamHandler {
return func(srv any, stream grpc.ServerStream) error {
method, ok := grpc.MethodFromServerStream(stream)
if !ok {
Expand Down Expand Up @@ -137,7 +138,7 @@ func getHeightFromCtx(ctx context.Context) (uint64, error) {
return 0, nil
}
if len(values) != 1 {
return 0, fmt.Errorf("gRPC height metadata must be of lenght 1, got: %d", len(values))
return 0, fmt.Errorf("gRPC height metadata must be of length 1, got: %d", len(values))
}

heightStr := values[0]
Expand Down

0 comments on commit 9308ae7

Please sign in to comment.