@@ -428,7 +428,7 @@ func runLocalClaimOutgoingHTLC(ht *lntest.HarnessTest,
428428 // We expect to see tow txns in the mempool,
429429 // 1. Bob's force close tx.
430430 // 2. Bob's anchor sweep tx.
431- ht .AssertNumTxsInMempool ( 2 )
431+ ht .AssertNumTxsInMempoolWithSweepTrigger ( 2 , bob )
432432
433433 // Mine a block to confirm the closing tx and the anchor sweeping tx.
434434 ht .MineBlocksAndAssertNumTxes (1 , 2 )
@@ -447,7 +447,7 @@ func runLocalClaimOutgoingHTLC(ht *lntest.HarnessTest,
447447 // Bob's sweeper should sweep his outgoing HTLC immediately since it's
448448 // expired. His to_local output cannot be swept due to the CSV lock.
449449 // Carol's anchor sweep should be failed due to output being dust.
450- ht .AssertNumTxsInMempool ( 1 )
450+ ht .AssertNumTxsInMempoolWithSweepTrigger ( 1 , bob )
451451
452452 // Mine a block to confirm Bob's outgoing HTLC sweeping tx.
453453 ht .MineBlocksAndAssertNumTxes (1 , 1 )
@@ -788,7 +788,7 @@ func runMultiHopReceiverPreimageClaim(ht *lntest.HarnessTest,
788788 // We expect to see tow txns in the mempool,
789789 // 1. Carol's force close tx.
790790 // 2. Carol's anchor sweep tx.
791- ht .AssertNumTxsInMempool ( 2 )
791+ ht .AssertNumTxsInMempoolWithSweepTrigger ( 2 , carol )
792792
793793 // Mine a block to confirm the closing tx and the anchor sweeping tx.
794794 ht .MineBlocksAndAssertNumTxes (1 , 2 )
@@ -1133,7 +1133,7 @@ func runLocalForceCloseBeforeHtlcTimeout(ht *lntest.HarnessTest,
11331133 ht .MineBlocks (int (defaultCSV - 1 ))
11341134
11351135 // Mine a block to confirm Bob's to_local sweep.
1136- ht .MineBlocksAndAssertNumTxes (1 , 1 )
1136+ ht .MineBlocksAndAssertNumTxesWithSweep (1 , 1 , bob )
11371137 }
11381138
11391139 // We'll now mine enough blocks for the HTLC to expire. After this, Bob
@@ -1457,7 +1457,7 @@ func runRemoteForceCloseBeforeHtlcTimeout(ht *lntest.HarnessTest,
14571457 // won't be swept due it being uneconomical. For Carol, since
14581458 // her anchor is not used for CPFP, it'd be also uneconomical
14591459 // to sweep so it will fail.
1460- ht .MineBlocksAndAssertNumTxes (1 , 1 )
1460+ ht .MineBlocksAndAssertNumTxesWithSweep (1 , 1 , bob )
14611461 }
14621462
14631463 // Next, we'll mine enough blocks for the HTLC to expire. At this
@@ -1711,7 +1711,7 @@ func runLocalClaimIncomingHTLC(ht *lntest.HarnessTest,
17111711 // commit tx). Her anchor output won't be swept as it's uneconomical.
17121712 // For Bob, since his anchor is not used for CPFP, it'd be uneconomical
17131713 // to sweep so it will fail.
1714- ht .AssertNumTxsInMempool ( 1 )
1714+ ht .AssertNumTxsInMempoolWithSweepTrigger ( 1 , alice )
17151715
17161716 // Mine a block to confirm Alice's sweeping tx.
17171717 ht .MineBlocksAndAssertNumTxes (1 , 1 )
@@ -1771,7 +1771,7 @@ func runLocalClaimIncomingHTLC(ht *lntest.HarnessTest,
17711771 // commitment anchor output, we'd expect to see two txns,
17721772 // - Carol's second level HTLC tx.
17731773 // - Bob's commitment output sweeping tx.
1774- ht .AssertNumTxsInMempool ( 2 )
1774+ ht .AssertNumTxsInMempoolWithSweepTrigger ( 2 , bob )
17751775
17761776 // At this point we suspend Alice to make sure she'll handle the
17771777 // on-chain settle after a restart.
@@ -2045,7 +2045,7 @@ func runLocalClaimIncomingHTLCLeased(ht *lntest.HarnessTest,
20452045 //
20462046 // Carol will broadcast her second-level HTLC sweeping txns. Bob canoot
20472047 // sweep his commitment anchor output yet due to it being CLTV locked.
2048- ht .AssertNumTxsInMempool ( 1 )
2048+ ht .AssertNumTxsInMempoolWithSweepTrigger ( 1 , carol )
20492049
20502050 // At this point we suspend Alice to make sure she'll handle the
20512051 // on-chain settle after a restart.
@@ -2401,7 +2401,7 @@ func runLocalPreimageClaim(ht *lntest.HarnessTest,
24012401 // We mine one block to confirm,
24022402 // - Carol's sweeping tx of the incoming HTLC.
24032403 // - Bob's sweeping tx of his commit output.
2404- ht .MineBlocksAndAssertNumTxes (1 , 2 )
2404+ ht .MineBlocksAndAssertNumTxesWithSweep (1 , 2 , carol )
24052405
24062406 // When Bob notices Carol's second level tx in the block, he will
24072407 // extract the preimage and offer the HTLC to his sweeper. So he has,
@@ -2641,7 +2641,7 @@ func runLocalPreimageClaimLeased(ht *lntest.HarnessTest,
26412641
26422642 // We mine one block to confirm,
26432643 // - Carol's sweeping tx of the incoming HTLC.
2644- ht .MineBlocksAndAssertNumTxes (1 , 1 )
2644+ ht .MineBlocksAndAssertNumTxesWithSweep (1 , 1 , carol )
26452645
26462646 // When Bob notices Carol's second level tx in the block, he will
26472647 // extract the preimage and offer the HTLC to his sweeper. So he has,
@@ -3030,7 +3030,7 @@ func runHtlcAggregation(ht *lntest.HarnessTest,
30303030
30313031 // Bob's force close tx and anchor sweeping tx should now be found in
30323032 // the mempool.
3033- ht .AssertNumTxsInMempool ( 2 )
3033+ ht .AssertNumTxsInMempoolWithSweepTrigger ( 2 , bob )
30343034
30353035 // Mine a block to confirm Bob's force close tx and anchor sweeping tx.
30363036 ht .MineBlocksAndAssertNumTxes (1 , 2 )
@@ -3062,7 +3062,7 @@ func runHtlcAggregation(ht *lntest.HarnessTest,
30623062 // 2. Bob's sweeping tx for all success HTLCs.
30633063 // 3. Carol's sweeping tx for her commit output.
30643064 // Mine a block to confirm them.
3065- ht .MineBlocksAndAssertNumTxes (1 , 3 )
3065+ ht .MineBlocksAndAssertNumTxesWithSweep (1 , 3 , carol )
30663066
30673067 // For this channel, we also check the number of HTLCs and the stage
30683068 // are correct.
0 commit comments