From 49afc0f90da451759b6bd8cfed37cf8e0f6ad808 Mon Sep 17 00:00:00 2001 From: yihuang Date: Tue, 15 Mar 2022 18:28:14 +0800 Subject: [PATCH] fix: server should always use local rpc client (#988) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Closes: #987 Solution: - use local rpc clint if json-rpc is enabled. Co-authored-by: Federico Kunze Küllmer <31522760+fedekunze@users.noreply.github.com> --- CHANGELOG.md | 1 + server/start.go | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index b7b4a0d1..7b042874 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -55,6 +55,7 @@ Ref: https://keepachangelog.com/en/1.0.0/ ### Improvements - (rpc) [tharsis#979](https://github.com/tharsis/ethermint/pull/979) Add configurable timeouts to http server +- (rpc) [tharsis#988](https://github.com/tharsis/ethermint/pull/988) json-rpc server always use local rpc client ## [v0.10.1] - 2022-03-04 diff --git a/server/start.go b/server/start.go index d72a2b9a..eacb3804 100644 --- a/server/start.go +++ b/server/start.go @@ -318,9 +318,9 @@ func startInProcess(ctx *server.Context, clientCtx client.Context, appCreator ty } // Add the tx service to the gRPC router. We only need to register this - // service if API or gRPC is enabled, and avoid doing so in the general + // service if API or gRPC or JSONRPC 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 { + if config.API.Enable || config.GRPC.Enable || config.JSONRPC.Enable { clientCtx = clientCtx.WithClient(local.New(tmNode)) app.RegisterTxService(clientCtx)