mirror of
https://github.com/lightningnetwork/lnd.git
synced 2025-08-28 14:40:51 +02:00
lntest+itest: add method AssertNumTxsInMempool
and AssertTxInBlock
in harness Prepare to make `HarnessTest.Miner` a private instance to sync height.
This commit is contained in:
@@ -45,7 +45,7 @@ func testOpenChannelAfterReorg(ht *lntest.HarnessTest) {
|
||||
|
||||
// Wait for miner to have seen the funding tx. The temporary miner is
|
||||
// disconnected, and won't see the transaction.
|
||||
ht.Miner.AssertNumTxsInMempool(1)
|
||||
ht.AssertNumTxsInMempool(1)
|
||||
|
||||
// At this point, the channel's funding transaction will have been
|
||||
// broadcast, but not confirmed, and the channel should be pending.
|
||||
@@ -59,7 +59,7 @@ func testOpenChannelAfterReorg(ht *lntest.HarnessTest) {
|
||||
// channel on the original miner's chain, which should be considered
|
||||
// open.
|
||||
block := ht.MineBlocksAndAssertNumTxes(10, 1)[0]
|
||||
ht.Miner.AssertTxInBlock(block, fundingTxID)
|
||||
ht.AssertTxInBlock(block, fundingTxID)
|
||||
_, err = tempMiner.Client.Generate(15)
|
||||
require.NoError(ht, err, "unable to generate blocks")
|
||||
|
||||
@@ -115,7 +115,7 @@ func testOpenChannelAfterReorg(ht *lntest.HarnessTest) {
|
||||
|
||||
// Cleanup by mining the funding tx again, then closing the channel.
|
||||
block = ht.MineBlocksAndAssertNumTxes(1, 1)[0]
|
||||
ht.Miner.AssertTxInBlock(block, fundingTxID)
|
||||
ht.AssertTxInBlock(block, fundingTxID)
|
||||
|
||||
ht.CloseChannel(alice, chanPoint)
|
||||
}
|
||||
|
Reference in New Issue
Block a user