itest: fix context leak in testZeroConfReorg

This commit is contained in:
yyforyongyu 2023-01-31 20:29:33 +08:00
parent d7c38b2c58
commit eb57de2f0e
No known key found for this signature in database
GPG Key ID: 9BCD95C4FF296868

View File

@ -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)