itest: remove redundant block in multiple tests

This commit is contained in:
yyforyongyu
2024-10-25 14:05:55 +08:00
parent 9c0c373b7e
commit 425877e745
3 changed files with 15 additions and 9 deletions

View File

@@ -1320,12 +1320,20 @@ func testDataLossProtection(ht *lntest.HarnessTest) {
// information Dave needs to sweep his funds.
require.NoError(ht, restartDave(), "unable to restart Eve")
// Mine a block to trigger Dave's chain watcher to process Carol's sweep
// tx.
//
// TODO(yy): remove this block once the blockbeat starts remembering
// its last processed block and can handle looking for spends in the
// past blocks.
ht.MineEmptyBlocks(1)
// Make sure Dave still has the pending force close channel.
ht.AssertNumPendingForceClose(dave, 1)
// Dave should have a pending sweep.
ht.AssertNumPendingSweeps(dave, 1)
// Mine a block to trigger the sweep.
ht.MineBlocks(1)
// Dave should sweep his funds.
ht.AssertNumTxsInMempool(1)