diff --git a/server/start.go b/server/start.go index 41fdaaaec1fd..bdf77281ad81 100644 --- a/server/start.go +++ b/server/start.go @@ -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)