Skip to content

Commit 50d6864

Browse files
committed
itest: adopt itests for the new behavior
Now outgoing dust-htlcs are canceled back before the commitment is confirmed onchain.
1 parent 7aa9ade commit 50d6864

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

itest/lnd_multi-hop_test.go

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -250,18 +250,17 @@ func runMultiHopHtlcLocalTimeout(ht *lntest.HarnessTest,
250250
op := ht.OutPointFromChannelPoint(bobChanPoint)
251251
closeTx := ht.AssertOutpointInMempool(op)
252252

253+
// Dust HTLCs are immediately canceled backwards as soon as the local
254+
// commitment tx is successfully broadcasted to the local mempool.
255+
ht.AssertActiveHtlcs(alice, payHash)
256+
253257
// Bob's anchor output should be offered to his sweep since Bob has
254258
// time-sensitive HTLCs - we expect both anchors are offered.
255259
ht.AssertNumPendingSweeps(bob, 2)
256260

257261
// Mine a block to confirm the closing transaction.
258262
ht.MineBlocksAndAssertNumTxes(1, 1)
259263

260-
// At this point, Bob should have canceled backwards the dust HTLC
261-
// that we sent earlier. This means Alice should now only have a single
262-
// HTLC on her channel.
263-
ht.AssertActiveHtlcs(alice, payHash)
264-
265264
// With the closing transaction confirmed, we should expect Bob's HTLC
266265
// timeout transaction to be offered to the sweeper due to the expiry
267266
// being reached. we also expect Bon and Carol's anchor sweeps.

0 commit comments

Comments
 (0)