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:
yyforyongyu authored and yyforyongyu committed 2024-07-23 21:30:07 +08:00
1 parent e553895ddd
commit 976bb37972
20 files changed
+108 -93

No files matched your search

+2 -2
View File
@@ -296,7 +296,7 @@ func assertSignOutputRaw(ht *lntest.HarnessTest,
alice.RPC.SendCoins(req)
// Wait until the TX is found in the mempool.
txid := ht.Miner.AssertNumTxsInMempool(1)[0]
txid := ht.AssertNumTxsInMempool(1)[0]
targetOutputIndex := ht.GetOutputIndex(txid, targetAddr.String())
@@ -359,7 +359,7 @@ func assertSignOutputRaw(ht *lntest.HarnessTest,
})
// Wait until the spending tx is found.
txid = ht.Miner.AssertNumTxsInMempool(1)[0]
txid = ht.AssertNumTxsInMempool(1)[0]
p2wkhOutputIndex := ht.GetOutputIndex(txid, p2wkhAdrr.String())
op := &lnrpc.OutPoint{