diff --git a/protocol/rpcprovider/provider_listener.go b/protocol/rpcprovider/provider_listener.go index f5bbd0e8c7..0817c2a3af 100644 --- a/protocol/rpcprovider/provider_listener.go +++ b/protocol/rpcprovider/provider_listener.go @@ -61,8 +61,10 @@ func NewProviderListener(ctx context.Context, networkAddress lavasession.Network // GRPC lis := chainlib.GetListenerWithRetryGrpc("tcp", networkAddress.Address) - serverReceiveMaxMessageSize := grpc.MaxRecvMsgSize(1024 * 1024 * 32) // setting receive size to 32mb instead of 4mb default - grpcServer := grpc.NewServer(serverReceiveMaxMessageSize) + opts := []grpc.ServerOption{ + grpc.MaxRecvMsgSize(1024 * 1024 * 32), // setting receive size to 32mb instead of 4mb default + } + grpcServer := grpc.NewServer(opts...) wrappedServer := grpcweb.WrapServer(grpcServer) handler := func(resp http.ResponseWriter, req *http.Request) {