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 committed 2024-10-17 07:14:51 +08:00
1 parent af6b88a9f6
commit ed3cb26188
16 files changed
+99 -93

No files matched your search

+1 -1
View File
@@ -634,7 +634,7 @@ func channelForceClosureTest(ht *lntest.HarnessTest,
// Recorf the HTLC outpoint, such that we can later
// check whether it gets swept
op := wire.OutPoint{
Hash: *htlcTxID,
Hash: htlcTxID,
Index: uint32(i),
}
htlcTxOutpointSet[op] = 0
+1 -1
View File
@@ -117,7 +117,7 @@ func coopCloseWithHTLCs(ht *lntest.HarnessTest) {
)
// Wait for the close tx to be in the Mempool.
ht.AssertTxInMempool(&closeTxid)
ht.AssertTxInMempool(closeTxid)
// Wait for it to get mined and finish tearing down.
ht.AssertStreamChannelCoopClosed(alice, chanPoint, false, closeClient)
+3 -3
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
+15 -15
View File
@@ -736,8 +736,8 @@ func runMultiHopLocalForceCloseOnChainHtlcTimeout(ht *lntest.HarnessTest,
ht.MineBlocksAndAssertNumTxes(1, 1)
blocksMined++
htlcOutpoint := wire.OutPoint{Hash: *closeTx, Index: 2}
bobCommitOutpoint := wire.OutPoint{Hash: *closeTx, Index: 3}
htlcOutpoint := wire.OutPoint{Hash: closeTx, Index: 2}
bobCommitOutpoint := wire.OutPoint{Hash: closeTx, Index: 3}
// Before the HTLC times out, we'll need to assert that Bob broadcasts
// a sweep transaction for his commit output. Note that if the channel
@@ -761,7 +761,7 @@ func runMultiHopLocalForceCloseOnChainHtlcTimeout(ht *lntest.HarnessTest,
)
txid := commitSweepTx.TxHash()
block := ht.MineBlocksAndAssertNumTxes(1, 1)[0]
ht.AssertTxInBlock(block, &txid)
ht.AssertTxInBlock(block, txid)
blocksMined++
}
@@ -789,7 +789,7 @@ func runMultiHopLocalForceCloseOnChainHtlcTimeout(ht *lntest.HarnessTest,
// Next, we'll mine an additional block. This should serve to confirm
// the second layer timeout transaction.
block := ht.MineBlocksAndAssertNumTxes(1, 1)[0]
ht.AssertTxInBlock(block, &timeoutTx)
ht.AssertTxInBlock(block, timeoutTx)
// With the second layer timeout transaction confirmed, Bob should have
// canceled backwards the HTLC that carol sent.
@@ -1041,13 +1041,13 @@ func runMultiHopRemoteForceCloseOnChainHtlcTimeout(ht *lntest.HarnessTest,
// Mine a block to trigger the sweep.
ht.MineEmptyBlocks(1)
bobCommitOutpoint := wire.OutPoint{Hash: *closeTx, Index: 3}
bobCommitOutpoint := wire.OutPoint{Hash: closeTx, Index: 3}
bobCommitSweep := ht.AssertOutpointInMempool(
bobCommitOutpoint,
)
bobCommitSweepTxid := bobCommitSweep.TxHash()
block := ht.MineBlocksAndAssertNumTxes(1, 1)[0]
ht.AssertTxInBlock(block, &bobCommitSweepTxid)
ht.AssertTxInBlock(block, bobCommitSweepTxid)
}
ht.AssertNumPendingForceClose(bob, 0)
@@ -1226,7 +1226,7 @@ func runMultiHopHtlcLocalChainClaim(ht *lntest.HarnessTest,
// Mine a block that should confirm the commit tx.
block := ht.MineBlocksAndAssertNumTxes(1, 1)[0]
ht.AssertTxInBlock(block, &closingTxid)
ht.AssertTxInBlock(block, closingTxid)
// After the force close transaction is mined, Carol should offer her
// second-level success HTLC tx and anchor to the sweeper.
@@ -1303,7 +1303,7 @@ func runMultiHopHtlcLocalChainClaim(ht *lntest.HarnessTest,
bobSecondLvlTx := ht.GetNumTxsFromMempool(1)[0]
// It should spend from the commitment in the channel with Alice.
ht.AssertTxSpendFrom(bobSecondLvlTx, *bobForceClose)
ht.AssertTxSpendFrom(bobSecondLvlTx, bobForceClose)
// At this point, Bob should have broadcast his second layer success
// transaction, and should have sent it to the nursery for incubation.
@@ -1362,7 +1362,7 @@ func runMultiHopHtlcLocalChainClaim(ht *lntest.HarnessTest,
// Now Bob should have no pending channels anymore, as this just
// resolved it by the confirmation of the sweep transaction.
block = ht.MineBlocksAndAssertNumTxes(1, 1)[0]
ht.AssertTxInBlock(block, &bobSweepTxid)
ht.AssertTxInBlock(block, bobSweepTxid)
// With the script-enforced lease commitment type, Alice and Bob still
// haven't been able to sweep their respective commit outputs due to the
@@ -1397,7 +1397,7 @@ func runMultiHopHtlcLocalChainClaim(ht *lntest.HarnessTest,
// Both Alice and Bob show broadcast their commit sweeps.
aliceCommitOutpoint := wire.OutPoint{
Hash: *bobForceClose, Index: 3,
Hash: bobForceClose, Index: 3,
}
ht.AssertOutpointInMempool(
aliceCommitOutpoint,
@@ -1574,7 +1574,7 @@ func runMultiHopHtlcRemoteChainClaim(ht *lntest.HarnessTest,
// Mine a block, which should contain: the commitment.
block := ht.MineBlocksAndAssertNumTxes(1, 1)[0]
ht.AssertTxInBlock(block, &closingTxid)
ht.AssertTxInBlock(block, closingTxid)
// After the force close transaction is mined, Carol should offer her
// second level HTLC tx to the sweeper, along with her anchor output.
@@ -1628,12 +1628,12 @@ func runMultiHopHtlcRemoteChainClaim(ht *lntest.HarnessTest,
bobHtlcSweepTxid := bobHtlcSweep.TxHash()
// It should spend from the commitment in the channel with Alice.
ht.AssertTxSpendFrom(bobHtlcSweep, *aliceForceClose)
ht.AssertTxSpendFrom(bobHtlcSweep, aliceForceClose)
// We'll now mine a block which should confirm Bob's HTLC sweep
// transaction.
block = ht.MineBlocksAndAssertNumTxes(1, 1)[0]
ht.AssertTxInBlock(block, &bobHtlcSweepTxid)
ht.AssertTxInBlock(block, bobHtlcSweepTxid)
carolSecondLevelCSV--
// Now that the sweeping transaction has been confirmed, Bob should now
@@ -1690,7 +1690,7 @@ func runMultiHopHtlcRemoteChainClaim(ht *lntest.HarnessTest,
// Both Alice and Bob should broadcast their commit sweeps.
aliceCommitOutpoint := wire.OutPoint{
Hash: *aliceForceClose, Index: 3,
Hash: aliceForceClose, Index: 3,
}
ht.AssertOutpointInMempool(aliceCommitOutpoint)
bobCommitOutpoint := wire.OutPoint{Hash: closingTxid, Index: 3}
@@ -2145,7 +2145,7 @@ func runMultiHopHtlcAggregation(ht *lntest.HarnessTest,
// level sweep. Now Bob should have no pending channels anymore, as
// this just resolved it by the confirmation of the sweep transaction.
block := ht.MineBlocksAndAssertNumTxes(1, numExpected)[0]
ht.AssertTxInBlock(block, &bobSweep)
ht.AssertTxInBlock(block, bobSweep)
// For leased channels, we need to mine one more block to confirm Bob's
// commit output sweep.
+1 -1
View File
@@ -111,7 +111,7 @@ func testNonStdSweepInner(ht *lntest.HarnessTest, address string) {
for _, inp := range msgTx.TxIn {
// Fetch the previous outpoint's value.
prevOut := inp.PreviousOutPoint
ptx := ht.GetRawTransaction(&prevOut.Hash)
ptx := ht.GetRawTransaction(prevOut.Hash)
pout := ptx.MsgTx().TxOut[prevOut.Index]
inputVal += int(pout.Value)
+2 -2
View File
@@ -60,7 +60,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.AssertTxInBlock(block, fundingTxID)
ht.AssertTxInBlock(block, *fundingTxID)
_, err = tempMiner.Client.Generate(15)
require.NoError(ht, err, "unable to generate blocks")
@@ -116,7 +116,7 @@ func testOpenChannelAfterReorg(ht *lntest.HarnessTest) {
// Cleanup by mining the funding tx again, then closing the channel.
block = ht.MineBlocksAndAssertNumTxes(1, 1)[0]
ht.AssertTxInBlock(block, fundingTxID)
ht.AssertTxInBlock(block, *fundingTxID)
ht.CloseChannel(alice, chanPoint)
}
+8 -8
View File
@@ -306,7 +306,7 @@ func runPsbtChanFunding(ht *lntest.HarnessTest, carol, dave *node.HarnessNode,
txHash := finalTx.TxHash()
block := ht.MineBlocksAndAssertNumTxes(6, 1)[0]
ht.AssertTxInBlock(block, &txHash)
ht.AssertTxInBlock(block, txHash)
ht.AssertTopologyChannelOpen(carol, chanPoint)
ht.AssertTopologyChannelOpen(carol, chanPoint2)
@@ -481,7 +481,7 @@ func runPsbtChanFundingExternal(ht *lntest.HarnessTest, carol,
// Now we can mine a block to get the transaction confirmed, then wait
// for the new channel to be propagated through the network.
block := ht.MineBlocksAndAssertNumTxes(6, 1)[0]
ht.AssertTxInBlock(block, &txHash)
ht.AssertTxInBlock(block, txHash)
ht.AssertTopologyChannelOpen(carol, chanPoint)
ht.AssertTopologyChannelOpen(carol, chanPoint2)
@@ -638,7 +638,7 @@ func runPsbtChanFundingSingleStep(ht *lntest.HarnessTest, carol,
txHash := finalTx.TxHash()
block := ht.MineBlocksAndAssertNumTxes(6, 1)[0]
ht.AssertTxInBlock(block, &txHash)
ht.AssertTxInBlock(block, txHash)
ht.AssertTopologyChannelOpen(carol, chanPoint)
// Next, to make sure the channel functions as normal, we'll make some
@@ -1337,7 +1337,7 @@ func extractPublishAndMine(ht *lntest.HarnessTest, node *node.HarnessNode,
// Mine one block which should contain two transactions.
block := ht.MineBlocksAndAssertNumTxes(1, 1)[0]
txHash := finalTx.TxHash()
ht.AssertTxInBlock(block, &txHash)
ht.AssertTxInBlock(block, txHash)
return finalTx
}
@@ -1443,8 +1443,8 @@ func assertPsbtSpend(ht *lntest.HarnessTest, alice *node.HarnessNode,
block := ht.MineBlocksAndAssertNumTxes(1, 2)[0]
firstTxHash := prevTx.TxHash()
secondTxHash := finalTx.TxHash()
ht.AssertTxInBlock(block, &firstTxHash)
ht.AssertTxInBlock(block, &secondTxHash)
ht.AssertTxInBlock(block, firstTxHash)
ht.AssertTxInBlock(block, secondTxHash)
}
// assertPsbtFundSignSpend funds a PSBT from the internal wallet and then
@@ -1807,7 +1807,7 @@ func testPsbtChanFundingWithUnstableUtxos(ht *lntest.HarnessTest) {
txHash := finalTx.TxHash()
block := ht.MineBlocksAndAssertNumTxes(1, 1)[0]
ht.AssertTxInBlock(block, &txHash)
ht.AssertTxInBlock(block, txHash)
// Now we do the same but instead use preselected utxos to verify that
// these utxos respects the utxo restrictions on sweeper unconfirmed
@@ -1951,5 +1951,5 @@ func testPsbtChanFundingWithUnstableUtxos(ht *lntest.HarnessTest) {
txHash = finalTx.TxHash()
block = ht.MineBlocksAndAssertNumTxes(1, 1)[0]
ht.AssertTxInBlock(block, &txHash)
ht.AssertTxInBlock(block, txHash)
}
+12 -12
View File
@@ -128,7 +128,7 @@ func breachRetributionTestCase(ht *lntest.HarnessTest,
// ordering, the first output in this breach tx is the to_remote
// output.
toRemoteOp := wire.OutPoint{
Hash: *breachTXID,
Hash: breachTXID,
Index: 0,
}
@@ -151,7 +151,7 @@ func breachRetributionTestCase(ht *lntest.HarnessTest,
// Assert that all the inputs of this transaction are spending outputs
// generated by Bob's breach transaction above.
for _, txIn := range justiceTx.TxIn {
require.Equal(ht, *breachTXID, txIn.PreviousOutPoint.Hash,
require.Equal(ht, breachTXID, txIn.PreviousOutPoint.Hash,
"justice tx not spending commitment utxo")
}
@@ -174,7 +174,7 @@ func breachRetributionTestCase(ht *lntest.HarnessTest,
// transaction which was just accepted into the mempool.
block = ht.MineBlocksAndAssertNumTxes(1, 1)[0]
justiceTxid := justiceTx.TxHash()
ht.AssertTxInBlock(block, &justiceTxid)
ht.AssertTxInBlock(block, justiceTxid)
ht.AssertNodeNumChannels(carol, 0)
@@ -318,7 +318,7 @@ func revokedCloseRetributionZeroValueRemoteOutputCase(ht *lntest.HarnessTest,
// ordering, the first output in this breach tx is the to_local
// output.
toLocalOp := wire.OutPoint{
Hash: *breachTXID,
Hash: breachTXID,
Index: 0,
}
@@ -363,7 +363,7 @@ func revokedCloseRetributionZeroValueRemoteOutputCase(ht *lntest.HarnessTest,
// transaction which was just accepted into the mempool.
block := ht.MineBlocksAndAssertNumTxes(1, 1)[0]
justiceTxid := justiceTx.TxHash()
ht.AssertTxInBlock(block, &justiceTxid)
ht.AssertTxInBlock(block, justiceTxid)
// At this point, Dave should have no pending channels.
ht.AssertNodeNumChannels(dave, 0)
@@ -567,7 +567,7 @@ func revokedCloseRetributionRemoteHodlCase(ht *lntest.HarnessTest,
// outputs to the second level before Dave broadcasts his justice tx,
// we'll search through the mempool for a tx that matches the number of
// expected inputs in the justice tx.
var justiceTxid *chainhash.Hash
var justiceTxid chainhash.Hash
errNotFound := errors.New("justice tx not found")
findJusticeTx := func() (*chainhash.Hash, error) {
mempool := ht.GetRawMempool()
@@ -579,14 +579,14 @@ func revokedCloseRetributionRemoteHodlCase(ht *lntest.HarnessTest,
// NOTE: We don't use `ht.GetRawTransaction`
// which asserts a txid must be found as the HTLC
// spending txes might be aggregated.
tx, err := ht.Miner().Client.GetRawTransaction(txid)
tx, err := ht.Miner().Client.GetRawTransaction(&txid)
if err != nil {
return nil, err
}
exNumInputs := 2 + numInvoices
if len(tx.MsgTx().TxIn) == exNumInputs {
return txid, nil
return &txid, nil
}
}
@@ -598,7 +598,7 @@ func revokedCloseRetributionRemoteHodlCase(ht *lntest.HarnessTest,
if err != nil {
return err
}
justiceTxid = txid
justiceTxid = *txid
return nil
}, defaultTimeout)
@@ -619,7 +619,7 @@ func revokedCloseRetributionRemoteHodlCase(ht *lntest.HarnessTest,
return err
}
justiceTxid = txid
justiceTxid = *txid
return nil
}, defaultTimeout)
@@ -631,7 +631,7 @@ func revokedCloseRetributionRemoteHodlCase(ht *lntest.HarnessTest,
// isSecondLevelSpend checks that the passed secondLevelTxid is a
// potentitial second level spend spending from the commit tx.
isSecondLevelSpend := func(commitTxid,
secondLevelTxid *chainhash.Hash) bool {
secondLevelTxid chainhash.Hash) bool {
secondLevel := ht.GetRawTransaction(secondLevelTxid)
@@ -661,7 +661,7 @@ func revokedCloseRetributionRemoteHodlCase(ht *lntest.HarnessTest,
// the breach tx, Carol might have had the time to take an
// output to the second level. In that case, check that the
// justice tx is spending this second level output.
if isSecondLevelSpend(breachTXID, &txIn.PreviousOutPoint.Hash) {
if isSecondLevelSpend(breachTXID, txIn.PreviousOutPoint.Hash) {
continue
}
require.Fail(ht, "justice tx not spending commitment utxo "+
+1 -1
View File
@@ -318,7 +318,7 @@ func assertSignOutputRaw(ht *lntest.HarnessTest,
tx := wire.NewMsgTx(2)
tx.TxIn = []*wire.TxIn{{
PreviousOutPoint: wire.OutPoint{
Hash: *txid,
Hash: txid,
Index: uint32(targetOutputIndex),
},
}}
+9 -9
View File
@@ -214,7 +214,7 @@ func testSweepCPFPAnchorOutgoingTimeout(ht *lntest.HarnessTest) {
txns := ht.GetNumTxsFromMempool(2)
// Find the sweeping tx.
sweepTx := ht.FindSweepingTxns(txns, 1, *closeTxid)[0]
sweepTx := ht.FindSweepingTxns(txns, 1, closeTxid)[0]
// Get the weight for Bob's anchor sweeping tx.
txWeight := ht.CalculateTxWeight(sweepTx)
@@ -281,7 +281,7 @@ func testSweepCPFPAnchorOutgoingTimeout(ht *lntest.HarnessTest) {
txns = ht.GetNumTxsFromMempool(2)
// Find the sweeping tx.
sweepTx = ht.FindSweepingTxns(txns, 1, *closeTxid)[0]
sweepTx = ht.FindSweepingTxns(txns, 1, closeTxid)[0]
// Calculate the fee rate of Bob's new sweeping tx.
feeRate = uint64(ht.CalculateTxFeeRate(sweepTx))
@@ -320,7 +320,7 @@ func testSweepCPFPAnchorOutgoingTimeout(ht *lntest.HarnessTest) {
txns = ht.GetNumTxsFromMempool(2)
// Find the sweeping tx.
sweepTx = ht.FindSweepingTxns(txns, 1, *closeTxid)[0]
sweepTx = ht.FindSweepingTxns(txns, 1, closeTxid)[0]
// Calculate the fee of Bob's new sweeping tx.
fee = uint64(ht.CalculateTxFee(sweepTx))
@@ -341,7 +341,7 @@ func testSweepCPFPAnchorOutgoingTimeout(ht *lntest.HarnessTest) {
txns = ht.GetNumTxsFromMempool(2)
// Find the sweeping tx.
currentSweepTx := ht.FindSweepingTxns(txns, 1, *closeTxid)[0]
currentSweepTx := ht.FindSweepingTxns(txns, 1, closeTxid)[0]
// Assert the anchor sweep tx stays unchanged.
require.Equal(ht, sweepTx.TxHash(), currentSweepTx.TxHash())
@@ -553,7 +553,7 @@ func testSweepCPFPAnchorIncomingTimeout(ht *lntest.HarnessTest) {
txns := ht.GetNumTxsFromMempool(2)
// Find the sweeping tx.
sweepTx := ht.FindSweepingTxns(txns, 1, *closeTxid)[0]
sweepTx := ht.FindSweepingTxns(txns, 1, closeTxid)[0]
// Get the weight for Bob's anchor sweeping tx.
txWeight := ht.CalculateTxWeight(sweepTx)
@@ -620,7 +620,7 @@ func testSweepCPFPAnchorIncomingTimeout(ht *lntest.HarnessTest) {
txns = ht.GetNumTxsFromMempool(2)
// Find the sweeping tx.
sweepTx = ht.FindSweepingTxns(txns, 1, *closeTxid)[0]
sweepTx = ht.FindSweepingTxns(txns, 1, closeTxid)[0]
// Calculate the fee rate of Bob's new sweeping tx.
feeRate = uint64(ht.CalculateTxFeeRate(sweepTx))
@@ -659,7 +659,7 @@ func testSweepCPFPAnchorIncomingTimeout(ht *lntest.HarnessTest) {
txns = ht.GetNumTxsFromMempool(2)
// Find the sweeping tx.
sweepTx = ht.FindSweepingTxns(txns, 1, *closeTxid)[0]
sweepTx = ht.FindSweepingTxns(txns, 1, closeTxid)[0]
// Calculate the fee of Bob's new sweeping tx.
fee = uint64(ht.CalculateTxFee(sweepTx))
@@ -680,7 +680,7 @@ func testSweepCPFPAnchorIncomingTimeout(ht *lntest.HarnessTest) {
txns = ht.GetNumTxsFromMempool(2)
// Find the sweeping tx.
currentSweepTx := ht.FindSweepingTxns(txns, 1, *closeTxid)[0]
currentSweepTx := ht.FindSweepingTxns(txns, 1, closeTxid)[0]
// Assert the anchor sweep tx stays unchanged.
require.Equal(ht, sweepTx.TxHash(), currentSweepTx.TxHash())
@@ -2274,7 +2274,7 @@ func testBumpForceCloseFee(ht *lntest.HarnessTest) {
// this anchor sweep transaction (because of the small fee delta).
ht.MineEmptyBlocks(1)
cpfpHash1 := cpfpSweep1.TxHash()
ht.AssertTxInMempool(&cpfpHash1)
ht.AssertTxInMempool(cpfpHash1)
// Now Bump the fee rate again with a bigger starting fee rate of the
// fee function.
+4 -4
View File
@@ -171,7 +171,7 @@ func testTaprootComputeInputScriptKeySpendBip86(ht *lntest.HarnessTest,
ht.AssertUTXOInWallet(alice, op, "")
p2trOutpoint := wire.OutPoint{
Hash: *txid,
Hash: txid,
Index: uint32(p2trOutputIndex),
}
@@ -1413,7 +1413,7 @@ func clearWalletImportedTapscriptBalance(ht *lntest.HarnessTest,
// Mine one block which should contain the sweep transaction.
block := ht.MineBlocksAndAssertNumTxes(1, 1)[0]
sweepTxHash := sweepTx.TxHash()
ht.AssertTxInBlock(block, &sweepTxHash)
ht.AssertTxInBlock(block, sweepTxHash)
}
// testScriptHashLock returns a simple bitcoin script that locks the funds to
@@ -1484,7 +1484,7 @@ func sendToTaprootOutput(ht *lntest.HarnessTest, hn *node.HarnessNode,
txid := ht.AssertNumTxsInMempool(1)[0]
p2trOutputIndex := ht.GetOutputIndex(txid, tapScriptAddr.String())
p2trOutpoint := wire.OutPoint{
Hash: *txid,
Hash: txid,
Index: uint32(p2trOutputIndex),
}
@@ -1849,7 +1849,7 @@ func testTaprootCoopClose(ht *lntest.HarnessTest) {
// assertTaprootDeliveryUsed returns true if a Taproot addr was used in
// the co-op close transaction.
assertTaprootDeliveryUsed := func(closingTxid *chainhash.Hash) bool {
assertTaprootDeliveryUsed := func(closingTxid chainhash.Hash) bool {
tx := ht.GetRawTransaction(closingTxid)
for _, txOut := range tx.MsgTx().TxOut {
if !txscript.IsPayToTaproot(txOut.PkScript) {
+2 -2
View File
@@ -372,7 +372,7 @@ func fundChanAndCloseFromImportedAccount(ht *lntest.HarnessTest, srcNode,
)
block := ht.MineBlocksAndAssertNumTxes(6, 1)[0]
ht.AssertTxInBlock(block, txHash)
ht.AssertTxInBlock(block, *txHash)
confBalanceAfterChan += chanChangeUtxoAmt
ht.AssertWalletAccountBalance(srcNode, account, 0, 0)
@@ -389,7 +389,7 @@ func fundChanAndCloseFromImportedAccount(ht *lntest.HarnessTest, srcNode,
)
block := ht.MineBlocksAndAssertNumTxes(6, 1)[0]
ht.AssertTxInBlock(block, txHash)
ht.AssertTxInBlock(block, *txHash)
confBalanceAfterChan += chanChangeUtxoAmt
ht.AssertWalletAccountBalance(