diff --git a/server/grpc/server.go b/server/grpc/server.go index e38e310af3..1874781e85 100644 --- a/server/grpc/server.go +++ b/server/grpc/server.go @@ -5,6 +5,7 @@ import ( "fmt" "net" + gogogrpc "github.com/cosmos/gogoproto/grpc" "google.golang.org/grpc" "cosmossdk.io/log" @@ -14,13 +15,16 @@ import ( "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" - "github.com/cosmos/cosmos-sdk/server/types" _ "github.com/cosmos/cosmos-sdk/types/tx/amino" // Import amino.proto file for reflection ) +type grpcApp interface { + RegisterGRPCServerWithSkipCheckHeader(gogogrpc.Server, bool) +} + // NewGRPCServer returns a correctly configured and initialized gRPC server. // Note, the caller is responsible for starting the server. See StartGRPCServer. -func NewGRPCServer(clientCtx client.Context, app types.Application, cfg config.GRPCConfig) (*grpc.Server, error) { +func NewGRPCServer(clientCtx client.Context, app grpcApp, cfg config.GRPCConfig) (*grpc.Server, error) { maxSendMsgSize := cfg.MaxSendMsgSize if maxSendMsgSize == 0 { maxSendMsgSize = config.DefaultGRPCMaxSendMsgSize