Skip to content

Commit

Permalink
itest: document and fix wallet UTXO flake
Browse files Browse the repository at this point in the history
  • Loading branch information
yyforyongyu committed Dec 12, 2024
1 parent e31c412 commit e1407ff
Showing 1 changed file with 32 additions and 2 deletions.
34 changes: 32 additions & 2 deletions itest/lnd_multi-hop_force_close_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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() {
Expand All @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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.
Expand Down

0 comments on commit e1407ff

Please sign in to comment.