lntest+itest: clean mempool in testHtlcTimeoutResolverExtractPreimageRemote

This commit is contained in:
yyforyongyu committed 2023-05-20 00:33:04 +08:00
1 parent 7f4bf7ce2b
commit c6cfc425a0
2 files changed
+36 -18

No files matched your search

+3 -9
View File
@@ -1646,18 +1646,12 @@ func (h *HarnessTest) cleanMempool() {
blocks := h.Miner.MineBlocksSlow(1)
bestBlock = blocks[len(blocks)-1]
// Make sure all the active nodes are synced.
h.AssertActiveNodesSyncedTo(bestBlock)
return fmt.Errorf("still have %d txes in mempool", len(mem))
}, wait.MinerMempoolTimeout)
require.NoError(h, err, "timeout cleaning up mempool")
// Exit early if the best block is nil, which means we haven't mined
// any blocks during the cleanup.
if bestBlock == nil {
return
}
// Make sure all the active nodes are synced.
h.AssertActiveNodesSyncedTo(bestBlock)
}
// CleanShutDown is used to quickly end a test by shutting down all non-standby