itest: fix testBumpForceCloseFee

This commit is contained in:
yyforyongyu 2024-10-17 08:41:22 +08:00
parent 1aeea8a90f
commit 0778009ac2
No known key found for this signature in database
GPG Key ID: 9BCD95C4FF296868

View File

@ -1881,6 +1881,7 @@ func testBumpForceCloseFee(ht *lntest.HarnessTest) {
if ht.IsNeutrinoBackend() {
ht.Skipf("skipping BumpForceCloseFee test for neutrino backend")
}
// fundAmt is the funding amount.
fundAmt := btcutil.Amount(1_000_000)
@ -1906,6 +1907,7 @@ func testBumpForceCloseFee(ht *lntest.HarnessTest) {
// Unwrap the results.
chanPoint := chanPoints[0]
alice := nodes[0]
bob := nodes[1]
// We need to fund alice with 2 wallet inputs so that we can test to
// increase the fee rate of the anchor cpfp via two subsequent calls of
@ -2018,6 +2020,10 @@ func testBumpForceCloseFee(ht *lntest.HarnessTest) {
txns = ht.GetNumTxsFromMempool(2)
ht.FindSweepingTxns(txns, 1, closingTx.TxHash())
// Shut down Bob, otherwise he will create a sweeping tx to collect the
// to_remote output once Alice's force closing tx is confirmed below.
ht.Shutdown(bob)
// Mine both transactions, the closing tx and the anchor cpfp tx.
// This is needed to clean up the mempool.
ht.MineBlocksAndAssertNumTxes(1, 2)