From 1dc66302cd64925bf8bcae1a890c4fc1531e06eb Mon Sep 17 00:00:00 2001 From: yyforyongyu Date: Wed, 10 May 2023 02:01:54 +0800 Subject: [PATCH] itest: fix test flake in testHtlcTimeoutResolverExtractPreimageRemote --- itest/lnd_multi-hop_test.go | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/itest/lnd_multi-hop_test.go b/itest/lnd_multi-hop_test.go index d45a272be..69807fcf3 100644 --- a/itest/lnd_multi-hop_test.go +++ b/itest/lnd_multi-hop_test.go @@ -1936,6 +1936,11 @@ func runExtraPreimageFromRemoteCommit(ht *lntest.HarnessTest, // notice the force close from Carol. require.NoError(ht, restartBob()) + // For anchor channels, Bob should sweep his anchor output. + if lntest.CommitTypeHasAnchors(c) { + ht.Miner.AssertNumTxsInMempool(1) + } + // Get the current height to compute number of blocks to mine to // trigger the htlc timeout resolver from Bob. _, height := ht.Miner.GetBestBlock()