itest: document missing wallet UTXO

This commit is contained in:
yyforyongyu
2025-03-05 09:41:12 +08:00
parent 061b7abf76
commit ec7c36fd6a
3 changed files with 25 additions and 77 deletions

View File

@@ -3,7 +3,9 @@ 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
@@ -31,3 +33,16 @@ func flakePreimageSettlement(ht *lntest.HarnessTest) {
// would cause the sweeper to RBF it.
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)
}