From eb57de2f0e9078f267faf76079cdecc268c41c07 Mon Sep 17 00:00:00 2001 From: yyforyongyu Date: Tue, 31 Jan 2023 20:29:33 +0800 Subject: [PATCH] itest: fix context leak in `testZeroConfReorg` --- itest/lnd_zero_conf_test.go | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/itest/lnd_zero_conf_test.go b/itest/lnd_zero_conf_test.go index a4838165f..eb1bc59bf 100644 --- a/itest/lnd_zero_conf_test.go +++ b/itest/lnd_zero_conf_test.go @@ -1041,11 +1041,10 @@ func testZeroConfReorg(ht *lntest.HarnessTest) { ht.WaitForNodeBlockHeight(carol, tempMinerHeight) err = wait.Predicate(func() bool { - ctxt, _ := context.WithTimeout(ctxb, defaultTimeout) - - _, err = carol.RPC.LN.GetChanInfo(ctxt, &lnrpc.ChanInfoRequest{ - ChanId: aliasmgr.StartingAlias.ToUint64(), - }) + _, err = carol.RPC.LN.GetChanInfo( + ht.Context(), &lnrpc.ChanInfoRequest{ + ChanId: aliasmgr.StartingAlias.ToUint64(), + }) return err == nil }, defaultTimeout)