Add GetTx gRPC endpoint (#7688)
* Add empty TxByHash * Fix search & replace * Renname to GetTx * Make getTx grpc work * Hash as string * Add todo comment * /tx * Make tests pass * Put into function * Add changelog * Fix lint * RegisterTxService in server * Remove comment * Update proto/cosmos/tx/v1beta1/service.proto Co-authored-by: Cory <cjlevinson@gmail.com> * Create new protoCdc * Move tx service to x/auth * Small tweaks * Link gh issue * Fix lint * Update x/auth/tx/service.go Co-authored-by: Aleksandr Bezobchuk <alexanderbez@users.noreply.github.com> Co-authored-by: Cory <cjlevinson@gmail.com> Co-authored-by: Federico Kunze <31522760+fedekunze@users.noreply.github.com> Co-authored-by: Aleksandr Bezobchuk <alexanderbez@users.noreply.github.com> Co-authored-by: SaReN <sahithnarahari@gmail.com>
This commit is contained in:
co-authored by
Cory
Aleksandr Bezobchuk
Federico Kunze
SaReN
parent
b2bc32f3c9
commit
1961935fc7
@@ -59,10 +59,16 @@ func startInProcess(cfg Config, val *Validator) error {
|
||||
val.RPCClient = local.New(tmNode)
|
||||
}
|
||||
|
||||
if val.APIAddress != "" {
|
||||
// We'll need a RPC client if the validator exposes a gRPC or REST endpoint.
|
||||
if val.APIAddress != "" || val.AppConfig.GRPC.Enable {
|
||||
val.ClientCtx = val.ClientCtx.
|
||||
WithClient(val.RPCClient)
|
||||
|
||||
// Add the tx service in the gRPC router.
|
||||
app.RegisterTxService(val.ClientCtx)
|
||||
}
|
||||
|
||||
if val.APIAddress != "" {
|
||||
apiSrv := api.New(val.ClientCtx, logger.With("module", "api-server"))
|
||||
app.RegisterAPIRoutes(apiSrv, val.AppConfig.API)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user