mirror of
https://github.com/lightningnetwork/lnd.git
synced 2025-02-23 22:46:40 +01:00
itest: remove redundant blocks in channel backup tests
This commit is contained in:
parent
a55408d4a1
commit
9d4a60d613
1 changed files with 1 additions and 13 deletions
|
@ -1482,7 +1482,6 @@ func assertTimeLockSwept(ht *lntest.HarnessTest, carol, dave *node.HarnessNode,
|
|||
expectedTxes := 1
|
||||
|
||||
// Mine a block to trigger the sweeps.
|
||||
ht.MineBlocks(1)
|
||||
ht.AssertNumTxsInMempool(expectedTxes)
|
||||
|
||||
// Carol should consider the channel pending force close (since she is
|
||||
|
@ -1512,7 +1511,7 @@ func assertTimeLockSwept(ht *lntest.HarnessTest, carol, dave *node.HarnessNode,
|
|||
// The commit sweep resolver publishes the sweep tx at defaultCSV-1 and
|
||||
// we already mined one block after the commitment was published, and
|
||||
// one block to trigger Carol's sweeps, so take that into account.
|
||||
ht.MineEmptyBlocks(1)
|
||||
ht.MineBlocks(2)
|
||||
ht.AssertNumPendingSweeps(dave, 2)
|
||||
|
||||
// Mine a block to trigger the sweeps.
|
||||
|
@ -1615,8 +1614,6 @@ func assertDLPExecuted(ht *lntest.HarnessTest,
|
|||
// output and the other for her anchor.
|
||||
ht.AssertNumPendingSweeps(carol, 2)
|
||||
|
||||
// Mine a block to trigger the sweep.
|
||||
ht.MineEmptyBlocks(1)
|
||||
ht.MineBlocksAndAssertNumTxes(1, 1)
|
||||
|
||||
// Now the channel should be fully closed also from Carol's POV.
|
||||
|
@ -1635,8 +1632,6 @@ func assertDLPExecuted(ht *lntest.HarnessTest,
|
|||
// output and the other for his anchor.
|
||||
ht.AssertNumPendingSweeps(dave, 2)
|
||||
|
||||
// Mine a block to trigger the sweep.
|
||||
ht.MineEmptyBlocks(1)
|
||||
ht.MineBlocksAndAssertNumTxes(1, 1)
|
||||
|
||||
// Now Dave should consider the channel fully closed.
|
||||
|
@ -1652,10 +1647,6 @@ func assertDLPExecuted(ht *lntest.HarnessTest,
|
|||
ht.AssertNumPendingSweeps(dave, 1)
|
||||
}
|
||||
|
||||
// Mine one block to trigger the sweeper to sweep.
|
||||
ht.MineEmptyBlocks(1)
|
||||
blocksMined++
|
||||
|
||||
// Expect one tx - the commitment sweep from Dave. For anchor
|
||||
// channels, we expect the two anchor sweeping txns to be
|
||||
// failed due they are uneconomical.
|
||||
|
@ -1673,9 +1664,6 @@ func assertDLPExecuted(ht *lntest.HarnessTest,
|
|||
// commitmment was published, so take that into account.
|
||||
ht.MineEmptyBlocks(int(defaultCSV - blocksMined))
|
||||
|
||||
// Mine one block to trigger the sweeper to sweep.
|
||||
ht.MineEmptyBlocks(1)
|
||||
|
||||
// Carol should have two pending sweeps:
|
||||
// 1. her commit output.
|
||||
// 2. her anchor output, if this is anchor channel.
|
||||
|
|
Loading…
Add table
Reference in a new issue