From f96072d9a81d1eb354b605204c59facec4b1e15f Mon Sep 17 00:00:00 2001 From: Julien Robert Date: Wed, 30 Nov 2022 13:26:20 +0100 Subject: [PATCH] fix: do not shadow clientCtx in start.go (#14086) --- server/start.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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)