Skip to content

Commit

Permalink
fix: server should always use local rpc client (evmos#988)
Browse files Browse the repository at this point in the history
Closes: evmos#987
Solution:
- use local rpc clint if json-rpc is enabled.

Co-authored-by: Federico Kunze Küllmer <31522760+fedekunze@users.noreply.github.com>
  • Loading branch information
yihuang and fedekunze committed Mar 22, 2022
1 parent cf15e28 commit 23b1ddc
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,9 @@ Ref: https://keepachangelog.com/en/1.0.0/

- [crypto-org-chain/ethermint#]() reject invalid `MsgEthereumTx` wrapping tx in a non-breaking way

### Improvements
- (rpc) [tharsis#988](https://github.com/tharsis/ethermint/pull/988) json-rpc server always use local rpc client

## [v0.7.2-cronos-5] - 2021-12-16

### Bug Fixes
Expand Down
4 changes: 2 additions & 2 deletions server/start.go
Original file line number Diff line number Diff line change
Expand Up @@ -310,9 +310,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)
Expand Down

0 comments on commit 23b1ddc

Please sign in to comment.