itest/test: remove hold force close dependency

Our aggregate htlc test depends on our previous behavior
where recipients would allow channels with pending hold
invoice htlcs to force close. Now that we have an expiry
watcher to prevent these force closes, we can't rely on
this for tests because the recipient will cancel the htlcs
back before they expire.
This commit is contained in:
carla 2021-04-23 08:19:58 +02:00
parent 7536dd8179
commit d0d0d21573
No known key found for this signature in database
GPG Key ID: 4CA7FE54A6213C91

View File

@ -169,6 +169,12 @@ func testMultiHopHtlcAggregation(net *lntest.NetworkHarness, t *harnessTest,
// be cpfp'ed.
net.SetFeeEstimate(30000)
// We want Carol's htlcs to expire off-chain to demonstrate bob's force
// close. However, Carol will cancel her invoices to prevent force
// closes, so we shut her down for now.
restartCarol, err := net.SuspendNode(carol)
require.NoError(t.t, err)
// We'll now mine enough blocks to trigger Bob's broadcast of his
// commitment transaction due to the fact that the Carol's HTLCs are
// about to timeout. With the default outgoing broadcast delta of zero,
@ -225,6 +231,9 @@ func testMultiHopHtlcAggregation(net *lntest.NetworkHarness, t *harnessTest,
}
}
// Once bob has force closed, we can restart carol.
require.NoError(t.t, restartCarol())
// Mine a block to confirm the closing transaction.
mineBlocks(t, net, 1, expectedTxes)