From 533aeb8a253eb9d822fd358b9db2615354697950 Mon Sep 17 00:00:00 2001 From: yyforyongyu Date: Wed, 12 Mar 2025 22:16:15 +0800 Subject: [PATCH] itest: remove `flakeFundExtraUTXO` --- itest/flakes.go | 15 --------------- itest/lnd_multi-hop_force_close_test.go | 9 --------- itest/lnd_sweep_test.go | 4 ---- 3 files changed, 28 deletions(-) diff --git a/itest/flakes.go b/itest/flakes.go index 68c36a738..b9b036035 100644 --- a/itest/flakes.go +++ b/itest/flakes.go @@ -3,9 +3,7 @@ package itest import ( "time" - "github.com/btcsuite/btcd/btcutil" "github.com/lightningnetwork/lnd/lntest" - "github.com/lightningnetwork/lnd/lntest/node" ) // flakePreimageSettlement documents a flake found when testing the preimage @@ -34,19 +32,6 @@ func flakePreimageSettlement(ht *lntest.HarnessTest) { time.Sleep(2 * time.Second) } -// flakeFundExtraUTXO documents a flake found when testing the sweeping behavior -// of the given node, which would fail due to no wallet UTXO available, while -// there should be enough. -// -// TODO(yy): remove it once the issue is resolved. -func flakeFundExtraUTXO(ht *lntest.HarnessTest, node *node.HarnessNode) { - // The node should have enough wallet UTXOs here to sweep the HTLC in - // the end of this test. However, due to a known issue, the node's - // wallet may report there's no UTXO available. For details, - // - https://github.com/lightningnetwork/lnd/issues/8786 - ht.FundCoins(btcutil.SatoshiPerBitcoin, node) -} - // flakeTxNotifierNeutrino documents a flake found when running force close // tests using neutrino backend, which is a race between two notifications - one // for the spending notification, the other for the block which contains the diff --git a/itest/lnd_multi-hop_force_close_test.go b/itest/lnd_multi-hop_force_close_test.go index 9907f6a59..84f8c8d44 100644 --- a/itest/lnd_multi-hop_force_close_test.go +++ b/itest/lnd_multi-hop_force_close_test.go @@ -341,8 +341,6 @@ func runLocalClaimOutgoingHTLC(ht *lntest.HarnessTest, ht.FundCoins(btcutil.SatoshiPerBitcoin, bob) } - flakeFundExtraUTXO(ht, bob) - // Now that our channels are set up, we'll send two HTLC's from Alice // to Carol. The first HTLC will be universally considered "dust", // while the second will be a proper fully valued HTLC. @@ -685,7 +683,6 @@ func runMultiHopReceiverPreimageClaim(ht *lntest.HarnessTest, // Fund Carol one UTXO so she can sweep outputs. ht.FundCoins(btcutil.SatoshiPerBitcoin, carol) - flakeFundExtraUTXO(ht, carol) // If this is a taproot channel, then we'll need to make some manual // route hints so Alice can actually find a route. @@ -1601,8 +1598,6 @@ func runLocalClaimIncomingHTLC(ht *lntest.HarnessTest, // Fund Carol one UTXO so she can sweep outputs. ht.FundCoins(btcutil.SatoshiPerBitcoin, carol) - flakeFundExtraUTXO(ht, carol) - flakeFundExtraUTXO(ht, bob) // If this is a taproot channel, then we'll need to make some manual // route hints so Alice can actually find a route. @@ -1897,7 +1892,6 @@ func runLocalClaimIncomingHTLCLeased(ht *lntest.HarnessTest, // Fund Carol one UTXO so she can sweep outputs. ht.FundCoins(btcutil.SatoshiPerBitcoin, carol) - flakeFundExtraUTXO(ht, carol) // With the network active, we'll now add a new hodl invoice at Carol's // end. Make sure the cltv expiry delta is large enough, otherwise Bob @@ -2230,7 +2224,6 @@ func runLocalPreimageClaim(ht *lntest.HarnessTest, // Fund Carol one UTXO so she can sweep outputs. ht.FundCoins(btcutil.SatoshiPerBitcoin, carol) - flakeFundExtraUTXO(ht, carol) // If this is a taproot channel, then we'll need to make some manual // route hints so Alice can actually find a route. @@ -2490,7 +2483,6 @@ func runLocalPreimageClaimLeased(ht *lntest.HarnessTest, // Fund Carol one UTXO so she can sweep outputs. ht.FundCoins(btcutil.SatoshiPerBitcoin, carol) - flakeFundExtraUTXO(ht, carol) // With the network active, we'll now add a new hodl invoice at Carol's // end. Make sure the cltv expiry delta is large enough, otherwise Bob @@ -2842,7 +2834,6 @@ func runHtlcAggregation(ht *lntest.HarnessTest, // We need one additional UTXO to create the sweeping tx for the // second-level success txes. ht.FundCoins(btcutil.SatoshiPerBitcoin, bob) - flakeFundExtraUTXO(ht, bob) // If this is a taproot channel, then we'll need to make some manual // route hints so Alice+Carol can actually find a route. diff --git a/itest/lnd_sweep_test.go b/itest/lnd_sweep_test.go index 8f94db7b7..57d6a9bd6 100644 --- a/itest/lnd_sweep_test.go +++ b/itest/lnd_sweep_test.go @@ -115,8 +115,6 @@ func testSweepCPFPAnchorOutgoingTimeout(ht *lntest.HarnessTest) { ht.FundCoins(btcutil.SatoshiPerBitcoin, bob) } - flakeFundExtraUTXO(ht, bob) - // Subscribe the invoice. streamCarol := carol.RPC.SubscribeSingleInvoice(payHash[:]) @@ -435,8 +433,6 @@ func testSweepCPFPAnchorIncomingTimeout(ht *lntest.HarnessTest) { ht.FundCoins(btcutil.SatoshiPerBitcoin, bob) } - flakeFundExtraUTXO(ht, bob) - // Subscribe the invoice. streamCarol := carol.RPC.SubscribeSingleInvoice(payHash[:])