lntest+itest: strictly define the behavior of MineBlocks

This commit adds more assertion to `MineBlocks` so the caller won't
misuse it.
This commit is contained in:
yyforyongyu
2024-05-01 18:57:26 +08:00
committed by yyforyongyu
parent 91b20e661b
commit e553895ddd
8 changed files with 52 additions and 31 deletions

View File

@@ -58,7 +58,7 @@ func testOpenChannelAfterReorg(ht *lntest.HarnessTest) {
// and our new miner mine 15. This will also confirm our pending
// channel on the original miner's chain, which should be considered
// open.
block := ht.MineBlocks(10)[0]
block := ht.MineBlocksAndAssertNumTxes(10, 1)[0]
ht.Miner.AssertTxInBlock(block, fundingTxID)
_, err = tempMiner.Client.Generate(15)
require.NoError(ht, err, "unable to generate blocks")