diff --git a/CHANGELOG.md b/CHANGELOG.md index 53824b8153..6469a901c4 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -85,6 +85,7 @@ Ref: https://keepachangelog.com/en/1.0.0/ ### Bug Fixes +* (app) [#1505](https://github.com/evmos/ethermint/pull/1505) Setup gRPC node service with the application. * (server) [#1497](https://github.com/evmos/ethermint/pull/1497) Fix telemetry server setup for observability * (rpc) [#1442](https://github.com/evmos/ethermint/pull/1442) Fix decoding of `finalized` block number. * (rpc) [#1179](https://github.com/evmos/ethermint/pull/1179) Fix gas used in traceTransaction response. diff --git a/app/app.go b/app/app.go index 5041995bd1..2f32266ae2 100644 --- a/app/app.go +++ b/app/app.go @@ -19,6 +19,7 @@ import ( "github.com/cosmos/cosmos-sdk/baseapp" "github.com/cosmos/cosmos-sdk/client" + "github.com/cosmos/cosmos-sdk/client/grpc/node" "github.com/cosmos/cosmos-sdk/client/grpc/tmservice" "github.com/cosmos/cosmos-sdk/codec" "github.com/cosmos/cosmos-sdk/codec/types" @@ -792,6 +793,8 @@ func (app *EthermintApp) RegisterAPIRoutes(apiSvr *api.Server, apiConfig config. authtx.RegisterGRPCGatewayRoutes(clientCtx, apiSvr.GRPCGatewayRouter) // Register new tendermint queries routes from grpc-gateway. tmservice.RegisterGRPCGatewayRoutes(clientCtx, apiSvr.GRPCGatewayRouter) + // Register node gRPC service for grpc-gateway. + node.RegisterGRPCGatewayRoutes(clientCtx, apiSvr.GRPCGatewayRouter) // Register grpc-gateway routes for all modules. ModuleBasics.RegisterGRPCGatewayRoutes(clientCtx, apiSvr.GRPCGatewayRouter) @@ -817,6 +820,12 @@ func (app *EthermintApp) RegisterTendermintService(clientCtx client.Context) { ) } +// RegisterNodeService registers the node gRPC service on the provided +// application gRPC query router. +func (app *EthermintApp) RegisterNodeService(clientCtx client.Context) { + node.RegisterNodeService(clientCtx, app.GRPCQueryRouter()) +} + // RegisterSwaggerAPI registers swagger route with API Server func RegisterSwaggerAPI(_ client.Context, rtr *mux.Router) { statikFS, err := fs.New()