gRPC-gateway routes as alternative to legacy tendermint REST endpoints (#7965)
* WIP * WIP setup * WIP setup testsuite * add node_info * add GetLatestBlock,GetBlockByHeight grpc endpoints * add GetValidatorSetByHeight, GetLatestValidatorSet * fix lint * fix tests * proto format * Update Makefile * review changes * Makefile format * handle nil pagination * rename query.go to service.go * format Makefile * format Makefile * review changes * review changes Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
This commit is contained in:
+2
-2
@@ -258,10 +258,10 @@ func startInProcess(ctx *Context, clientCtx client.Context, appCreator types.App
|
||||
// service if API or gRPC is enabled, and avoid doing so in the general
|
||||
// case, because it spawns a new local tendermint RPC client.
|
||||
if config.API.Enable || config.GRPC.Enable {
|
||||
clientCtx = clientCtx.
|
||||
WithClient(local.New(tmNode))
|
||||
clientCtx = clientCtx.WithClient(local.New(tmNode))
|
||||
|
||||
app.RegisterTxService(clientCtx)
|
||||
app.RegisterTendermintService(clientCtx)
|
||||
}
|
||||
|
||||
var apiSrv *api.Server
|
||||
|
||||
@@ -43,6 +43,9 @@ type (
|
||||
// RegisterTxService registers the gRPC Query service for tx (such as tx
|
||||
// simulation, fetching txs by hash...).
|
||||
RegisterTxService(clientCtx client.Context)
|
||||
|
||||
// RegisterTendermintService registers the gRPC Query service for tendermint queries.
|
||||
RegisterTendermintService(clientCtx client.Context)
|
||||
}
|
||||
|
||||
// AppCreator is a function that allows us to lazily initialize an
|
||||
|
||||
Reference in New Issue
Block a user