From 55497dddffe0a227cd51f29884e1bab1e9538a4a Mon Sep 17 00:00:00 2001 From: "mergify[bot]" <37929162+mergify[bot]@users.noreply.github.com> Date: Wed, 30 Nov 2022 10:02:12 -0500 Subject: [PATCH] fix: do not shadow clientCtx in start.go (backport #14086) (#14101) * fix: do not shadow clientCtx in start.go (#14086) (cherry picked from commit f96072d9a81d1eb354b605204c59facec4b1e15f) # Conflicts: # server/start.go * updates Co-authored-by: Julien Robert --- server/start.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/server/start.go b/server/start.go index e8b7fc4b350c..a399b979d3d4 100644 --- a/server/start.go +++ b/server/start.go @@ -397,6 +397,8 @@ func startInProcess[T types.Application](svrCtx *Context, svrCfg serverconfig.Co // 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)