itest+lntest: fix itest re the new block driven behavior
This commit is contained in:
10 files changed
+445
-108
No files matched your search
+9
-3
@@ -1579,14 +1579,20 @@ func (h *HarnessTest) CleanupForceClose(hn *node.HarnessNode) {
|
||||
h.AssertNumPendingForceClose(hn, 1)
|
||||
|
||||
// Mine enough blocks for the node to sweep its funds from the force
|
||||
// closed channel. The commit sweep resolver is able to broadcast the
|
||||
// sweep tx up to one block before the CSV elapses, so wait until
|
||||
// defaulCSV-1.
|
||||
// closed channel. The commit sweep resolver is able to offer the input
|
||||
// to the sweeper at defaulCSV-1, and broadcast the sweep tx once one
|
||||
// more block is mined.
|
||||
//
|
||||
// NOTE: we might empty blocks here as we don't know the exact number
|
||||
// of blocks to mine. This may end up mining more blocks than needed.
|
||||
h.MineEmptyBlocks(node.DefaultCSV - 1)
|
||||
|
||||
// Assert there is one pending sweep.
|
||||
h.AssertNumPendingSweeps(hn, 1)
|
||||
|
||||
// Mine a block to trigger the sweep.
|
||||
h.MineEmptyBlocks(1)
|
||||
|
||||
// The node should now sweep the funds, clean up by mining the sweeping
|
||||
// tx.
|
||||
h.MineBlocksAndAssertNumTxes(1, 1)
|
||||
|
||||
Reference in new issue
Block a user