Skip to content

Commit

Permalink
fix: do not shadow clientCtx in start.go (cosmos#14086)
Browse files Browse the repository at this point in the history
  • Loading branch information
julienrbrt authored Nov 30, 2022
1 parent e087566 commit f96072d
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 @@ -348,7 +348,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 f96072d

Please sign in to comment.