From 41b3265b36f276c29c6cd5898a1cf4a8485e5c77 Mon Sep 17 00:00:00 2001 From: MD Aleem <72057206+aleem1314@users.noreply.github.com> Date: Mon, 27 Jun 2022 13:51:32 +0530 Subject: [PATCH] chore: register codec with grpc server (#12359) --- server/grpc/server.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/server/grpc/server.go b/server/grpc/server.go index 0bdea8bca2ea..78a8e1955af5 100644 --- a/server/grpc/server.go +++ b/server/grpc/server.go @@ -8,6 +8,7 @@ import ( "google.golang.org/grpc" "github.com/cosmos/cosmos-sdk/client" + "github.com/cosmos/cosmos-sdk/codec" "github.com/cosmos/cosmos-sdk/server/config" "github.com/cosmos/cosmos-sdk/server/grpc/gogoreflection" reflection "github.com/cosmos/cosmos-sdk/server/grpc/reflection/v2alpha1" @@ -28,6 +29,7 @@ func StartGRPCServer(clientCtx client.Context, app types.Application, cfg config } grpcSrv := grpc.NewServer( + grpc.ForceServerCodec(codec.NewProtoCodec(clientCtx.InterfaceRegistry).GRPCCodec()), grpc.MaxSendMsgSize(maxSendMsgSize), grpc.MaxRecvMsgSize(maxRecvMsgSize), )