Skip to content

Commit 2deddec

Browse files
committed
itest: document and fix wallet UTXO flake
1 parent 2401636 commit 2deddec

File tree

1 file changed

+32
-2
lines changed

1 file changed

+32
-2
lines changed

itest/lnd_multi-hop_force_close_test.go

Lines changed: 32 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -679,8 +679,6 @@ func runMultiHopReceiverPreimageClaim(ht *lntest.HarnessTest,
679679
alice, bob, carol := nodes[0], nodes[1], nodes[2]
680680
bobChanPoint := chanPoints[1]
681681

682-
ht.FundCoins(btcutil.SatoshiPerBitcoin, carol)
683-
684682
// For neutrino backend, we need to one more UTXO for Carol so she can
685683
// sweep her outputs.
686684
if ht.IsNeutrinoBackend() {
@@ -690,6 +688,14 @@ func runMultiHopReceiverPreimageClaim(ht *lntest.HarnessTest,
690688
// Fund Carol one UTXO so she can sweep outputs.
691689
ht.FundCoins(btcutil.SatoshiPerBitcoin, carol)
692690

691+
// Carol should have enough wallet UTXOs here to sweep the HTLC in the
692+
// end of this test. However, due to a known issue, Carol's wallet may
693+
// report there's no UTXO available. For details,
694+
// - https://github.com/lightningnetwork/lnd/issues/8786
695+
//
696+
// TODO(yy): remove this step once the issue is resolved.
697+
ht.FundCoins(btcutil.SatoshiPerBitcoin, carol)
698+
693699
// If this is a taproot channel, then we'll need to make some manual
694700
// route hints so Alice can actually find a route.
695701
var routeHints []*lnrpc.RouteHint
@@ -1633,6 +1639,22 @@ func runLocalClaimIncomingHTLC(ht *lntest.HarnessTest,
16331639
// Fund Carol one UTXO so she can sweep outputs.
16341640
ht.FundCoins(btcutil.SatoshiPerBitcoin, carol)
16351641

1642+
// Carol should have enough wallet UTXOs here to sweep the HTLC in the
1643+
// end of this test. However, due to a known issue, Carol's wallet may
1644+
// report there's no UTXO available. For details,
1645+
// - https://github.com/lightningnetwork/lnd/issues/8786
1646+
//
1647+
// TODO(yy): remove this step once the issue is resolved.
1648+
ht.FundCoins(btcutil.SatoshiPerBitcoin, carol)
1649+
1650+
// Bob should have enough wallet UTXOs here to sweep the HTLC in the
1651+
// end of this test. However, due to a known issue, Bob's wallet may
1652+
// report there's no UTXO available. For details,
1653+
// - https://github.com/lightningnetwork/lnd/issues/8786
1654+
//
1655+
// TODO(yy): remove this step once the issue is resolved.
1656+
ht.FundCoins(btcutil.SatoshiPerBitcoin, bob)
1657+
16361658
// If this is a taproot channel, then we'll need to make some manual
16371659
// route hints so Alice can actually find a route.
16381660
var routeHints []*lnrpc.RouteHint
@@ -2603,6 +2625,14 @@ func runLocalPreimageClaimLeased(ht *lntest.HarnessTest,
26032625
// Fund Carol one UTXO so she can sweep outputs.
26042626
ht.FundCoins(btcutil.SatoshiPerBitcoin, carol)
26052627

2628+
// Carol should have enough wallet UTXOs here to sweep the HTLC in the
2629+
// end of this test. However, due to a known issue, Carol's wallet may
2630+
// report there's no UTXO available. For details,
2631+
// - https://github.com/lightningnetwork/lnd/issues/8786
2632+
//
2633+
// TODO(yy): remove this step once the issue is resolved.
2634+
ht.FundCoins(btcutil.SatoshiPerBitcoin, carol)
2635+
26062636
// With the network active, we'll now add a new hodl invoice at Carol's
26072637
// end. Make sure the cltv expiry delta is large enough, otherwise Bob
26082638
// won't send out the outgoing htlc.

0 commit comments

Comments
 (0)