itest: document and fix wallet UTXO flake

This commit is contained in:
yyforyongyu committed 2024-12-20 19:38:14 +08:00
1 parent 7ab4081ffd
commit 76eeae32d6
1 file changed
+32 -2
+32 -2
View File
@@ -679,8 +679,6 @@ func runMultiHopReceiverPreimageClaim(ht *lntest.HarnessTest,
alice, bob, carol := nodes[0], nodes[1], nodes[2]
bobChanPoint := chanPoints[1]
ht.FundCoins(btcutil.SatoshiPerBitcoin, carol)
// For neutrino backend, we need to one more UTXO for Carol so she can
// sweep her outputs.
if ht.IsNeutrinoBackend() {
@@ -690,6 +688,14 @@ func runMultiHopReceiverPreimageClaim(ht *lntest.HarnessTest,
// Fund Carol one UTXO so she can sweep outputs.
ht.FundCoins(btcutil.SatoshiPerBitcoin, carol)
// Carol should have enough wallet UTXOs here to sweep the HTLC in the
// end of this test. However, due to a known issue, Carol's wallet may
// report there's no UTXO available. For details,
// - https://github.com/lightningnetwork/lnd/issues/8786
//
// TODO(yy): remove this step once the issue is resolved.
ht.FundCoins(btcutil.SatoshiPerBitcoin, carol)
// If this is a taproot channel, then we'll need to make some manual
// route hints so Alice can actually find a route.
var routeHints []*lnrpc.RouteHint
@@ -1633,6 +1639,22 @@ func runLocalClaimIncomingHTLC(ht *lntest.HarnessTest,
// Fund Carol one UTXO so she can sweep outputs.
ht.FundCoins(btcutil.SatoshiPerBitcoin, carol)
// Carol should have enough wallet UTXOs here to sweep the HTLC in the
// end of this test. However, due to a known issue, Carol's wallet may
// report there's no UTXO available. For details,
// - https://github.com/lightningnetwork/lnd/issues/8786
//
// TODO(yy): remove this step once the issue is resolved.
ht.FundCoins(btcutil.SatoshiPerBitcoin, carol)
// Bob should have enough wallet UTXOs here to sweep the HTLC in the
// end of this test. However, due to a known issue, Bob's wallet may
// report there's no UTXO available. For details,
// - https://github.com/lightningnetwork/lnd/issues/8786
//
// TODO(yy): remove this step once the issue is resolved.
ht.FundCoins(btcutil.SatoshiPerBitcoin, bob)
// If this is a taproot channel, then we'll need to make some manual
// route hints so Alice can actually find a route.
var routeHints []*lnrpc.RouteHint
@@ -2603,6 +2625,14 @@ func runLocalPreimageClaimLeased(ht *lntest.HarnessTest,
// Fund Carol one UTXO so she can sweep outputs.
ht.FundCoins(btcutil.SatoshiPerBitcoin, carol)
// Carol should have enough wallet UTXOs here to sweep the HTLC in the
// end of this test. However, due to a known issue, Carol's wallet may
// report there's no UTXO available. For details,
// - https://github.com/lightningnetwork/lnd/issues/8786
//
// TODO(yy): remove this step once the issue is resolved.
ht.FundCoins(btcutil.SatoshiPerBitcoin, 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
// won't send out the outgoing htlc.