From fc52a010552ed1acb1fa33da576b01408f646129 Mon Sep 17 00:00:00 2001 From: yyforyongyu Date: Tue, 31 Oct 2023 17:04:01 +0800 Subject: [PATCH] itest: fix test flake in `testHtlcTimeoutResolverExtractPreimageRemote` From the build, ``` harness_miner.go:218: Error Trace: /home/runner/work/lnd/lnd/lntest/harness_miner.go:218 /home/runner/work/lnd/lnd/lntest/harness.go:1641 /home/runner/work/lnd/lnd/itest/lnd_multi-hop_test.go:2207 /home/runner/work/lnd/lnd/itest/lnd_multi-hop_test.go:152 Error: Received unexpected error: want 2, got 3 in mempool: [a7cbb5724e39579cfc75d0469270f691988cb67fcc51a332256cafb193cf40bd b12a03a0622a3cf7d53867f060a6de8166e564a1a3109bc2be1ec0b720f305da 073d66885ccded1a770dc9aa5f1d44c8e10ac4e916e5ab50ef5149a5649ec8ba] Test: TestLightningNetworkDaemon/tranche03/130-of-135/neutrino/htlc_timeout_resolver_extract_preimage_remote/zeroconf=false/committype=SIMPLE_TAPROOT Messages: assert tx in mempool timeout harness.go:339: finished test: htlc_timeout_resolver_extract_preimage_remote, start height=1312, end height=1347, mined blocks=35 ``` --- itest/lnd_multi-hop_test.go | 7 ------- 1 file changed, 7 deletions(-) diff --git a/itest/lnd_multi-hop_test.go b/itest/lnd_multi-hop_test.go index 1841d77ca..e85de046a 100644 --- a/itest/lnd_multi-hop_test.go +++ b/itest/lnd_multi-hop_test.go @@ -2166,7 +2166,6 @@ func runExtraPreimageFromRemoteCommit(ht *lntest.HarnessTest, if ht.IsNeutrinoBackend() { // Mine a block to confirm Carol's 2nd level success tx. ht.MineBlocksAndAssertNumTxes(1, 1) - numTxesMempool-- numBlocks-- } @@ -2195,12 +2194,6 @@ func runExtraPreimageFromRemoteCommit(ht *lntest.HarnessTest, // anchor sweep tx in the mempool. case lnrpc.CommitmentType_SCRIPT_ENFORCED_LEASE: numTxesMempool++ - - // For neutrino backend, because of the additional block mined, - // Bob's output is now mature. - if ht.IsNeutrinoBackend() { - numTxesMempool++ - } } // Mine a block to clean the mempool.