Skip to content

Commit

Permalink
fix: do not shadow clientCtx in start.go (#14086) (#14102)
Browse files Browse the repository at this point in the history
  • Loading branch information
mergify[bot] authored Nov 30, 2022
1 parent 49b9aed commit 8bf996f
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion server/start.go
Original file line number Diff line number Diff line change
Expand Up @@ -299,7 +299,9 @@ 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 {
clientCtx := clientCtx.WithClient(local.New(tmNode))
// re-assign for making the client available below
// do not use := to avoid shadowing clientCtx
clientCtx = clientCtx.WithClient(local.New(tmNode))

app.RegisterTxService(clientCtx)
app.RegisterTendermintService(clientCtx)
Expand Down

0 comments on commit 8bf996f

Please sign in to comment.