Skip to content

Commit

Permalink
fix: do not shadow clientCtx in start.go (backport #14086) (#14101)
Browse files Browse the repository at this point in the history
* fix: do not shadow clientCtx in start.go (#14086)

(cherry picked from commit f96072d)

# Conflicts:
#	server/start.go

* updates

Co-authored-by: Julien Robert <julien@rbrt.fr>
  • Loading branch information
mergify[bot] and julienrbrt committed Nov 30, 2022
1 parent 72699f7 commit 85d6f66
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions server/start.go
Expand Up @@ -332,6 +332,8 @@ 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) && tmNode != nil {
// re-assign for making the client available below
// do not use := to avoid shadowing clientCtx
clientCtx = clientCtx.WithClient(local.New(tmNode))

app.RegisterTxService(clientCtx)
Expand Down

0 comments on commit 85d6f66

Please sign in to comment.