itest+lntest: stop using pointer to chainhash.Hash

This commit fixes the methods used in `lntest` so they stop using
pointers to chainhash.
This commit is contained in:
yyforyongyu
2024-10-17 07:14:51 +08:00
parent af6b88a9f6
commit ed3cb26188
16 changed files with 99 additions and 93 deletions

View File

@@ -874,7 +874,7 @@ func testChannelFundingPersistence(ht *lntest.HarnessTest) {
// channel has been opened. The funding transaction should be found
// within the newly mined block.
block := ht.MineBlocksAndAssertNumTxes(1, 1)[0]
ht.AssertTxInBlock(block, fundingTxID)
ht.AssertTxInBlock(block, *fundingTxID)
// Get the height that our transaction confirmed at.
height := int32(ht.CurrentHeight())
@@ -1067,13 +1067,13 @@ func testBatchChanFunding(ht *lntest.HarnessTest) {
// Mine the batch transaction and check the network topology.
block := ht.MineBlocksAndAssertNumTxes(6, 1)[0]
ht.AssertTxInBlock(block, txHash)
ht.AssertTxInBlock(block, *txHash)
ht.AssertTopologyChannelOpen(alice, chanPoint1)
ht.AssertTopologyChannelOpen(alice, chanPoint2)
ht.AssertTopologyChannelOpen(alice, chanPoint3)
// Check if the change type from the batch_open_channel funding is P2TR.
rawTx := ht.GetRawTransaction(txHash)
rawTx := ht.GetRawTransaction(*txHash)
require.Len(ht, rawTx.MsgTx().TxOut, 5)
// Check the fee rate of the batch-opening transaction. We expect slight