lntest+itest: flatten testMultiHopLocalForceCloseOnChainHtlcTimeout

This commit is contained in:
yyforyongyu committed 2024-12-20 17:54:10 +08:00
1 parent bc31979f7b
commit bef17f16cf
4 files changed
+348 -206

No files matched your search

+6 -2
View File
@@ -738,15 +738,19 @@ func (h *HarnessTest) AssertStreamChannelForceClosed(hn *node.HarnessNode,
channeldb.ChanStatusLocalCloseInitiator.String(),
"channel not coop broadcasted")
// Get the closing txid.
closeTxid, err := chainhash.NewHashFromStr(resp.ClosingTxid)
require.NoError(h, err)
// We'll now, generate a single block, wait for the final close status
// update, then ensure that the closing transaction was included in the
// block.
block := h.MineBlocksAndAssertNumTxes(1, 1)[0]
closeTx := h.AssertTxInMempool(*closeTxid)
h.MineBlockWithTx(closeTx)
// Consume one close event and assert the closing txid can be found in
// the block.
closingTxid := h.WaitForChannelCloseEvent(stream)
h.AssertTxInBlock(block, closingTxid)
// We should see zero waiting close channels and 1 pending force close
// channels now.