mirror of
https://github.com/lightningnetwork/lnd.git
synced 2025-01-19 05:45:21 +01:00
lntest+itest: make sure mempool is cleaned in watcher tower test
This commit adds the missing check for anchor sweep in test `revoked_uncooperative_close_retribution_altruist_watchtower`, also change the mempool check a bit so it's easier to track.
This commit is contained in:
parent
6792ca17b4
commit
8df5de3e43
@ -349,10 +349,6 @@ func (h *HarnessTest) Subtest(t *testing.T) *HarnessTest {
|
||||
return
|
||||
}
|
||||
|
||||
// We require the mempool to be cleaned from the test.
|
||||
require.Empty(st, st.Miner.GetRawMempool(), "mempool not "+
|
||||
"cleaned, please mine blocks to clean them all.")
|
||||
|
||||
// When we finish the test, reset the nodes' configs and take a
|
||||
// snapshot of each of the nodes' internal states.
|
||||
for _, node := range st.manager.standbyNodes {
|
||||
@ -362,8 +358,9 @@ func (h *HarnessTest) Subtest(t *testing.T) *HarnessTest {
|
||||
// If found running nodes, shut them down.
|
||||
st.shutdownNonStandbyNodes()
|
||||
|
||||
// Assert that mempool is cleaned
|
||||
st.Miner.AssertNumTxsInMempool(0)
|
||||
// We require the mempool to be cleaned from the test.
|
||||
require.Empty(st, st.Miner.GetRawMempool(), "mempool not "+
|
||||
"cleaned, please mine blocks to clean them all.")
|
||||
|
||||
// Finally, cancel the run context. We have to do it here
|
||||
// because we need to keep the context alive for the above
|
||||
|
@ -849,6 +849,11 @@ func testRevokedCloseRetributionAltruistWatchtowerCase(ht *lntemp.HarnessTest,
|
||||
|
||||
ht.AssertNumPendingForceClose(dave, 0)
|
||||
|
||||
// If this is an anchor channel, Dave would sweep the anchor.
|
||||
if anchors {
|
||||
ht.MineBlocksAndAssertNumTxes(1, 1)
|
||||
}
|
||||
|
||||
// Check that Dave's wallet balance is increased.
|
||||
err = wait.NoError(func() error {
|
||||
daveBalResp := dave.RPC.WalletBalance()
|
||||
|
Loading…
Reference in New Issue
Block a user