mirror of
https://github.com/lightningnetwork/lnd.git
synced 2025-06-14 10:51:52 +02:00
itest: fix flake in testSweepHTLCs
We need to make sure Caarol finishes settling her invoice with Bob before shutting down, so we make sure `AssertHTLCNotActive` on Bob happens before shutting node Carol.
This commit is contained in:
parent
fb91b04906
commit
c24f839fbe
@ -864,13 +864,13 @@ func testSweepHTLCs(ht *lntest.HarnessTest) {
|
|||||||
// Carol settles the first invoice.
|
// Carol settles the first invoice.
|
||||||
carol.RPC.SettleInvoice(preimageSettled[:])
|
carol.RPC.SettleInvoice(preimageSettled[:])
|
||||||
|
|
||||||
|
// Bob should have settled his outgoing HTLC with Carol.
|
||||||
|
ht.AssertHTLCNotActive(bob, bcChanPoint, payHashSettled[:])
|
||||||
|
|
||||||
// Let Carol go offline so we can focus on testing Bob's sweeping
|
// Let Carol go offline so we can focus on testing Bob's sweeping
|
||||||
// behavior.
|
// behavior.
|
||||||
ht.Shutdown(carol)
|
ht.Shutdown(carol)
|
||||||
|
|
||||||
// Bob should have settled his outgoing HTLC with Carol.
|
|
||||||
ht.AssertHTLCNotActive(bob, bcChanPoint, payHashSettled[:])
|
|
||||||
|
|
||||||
// We'll now mine enough blocks to trigger Bob to force close channel
|
// We'll now mine enough blocks to trigger Bob to force close channel
|
||||||
// Bob->Carol due to his outgoing HTLC is about to timeout. With the
|
// Bob->Carol due to his outgoing HTLC is about to timeout. With the
|
||||||
// default outgoing broadcast delta of zero, this will be the same
|
// default outgoing broadcast delta of zero, this will be the same
|
||||||
|
Loading…
x
Reference in New Issue
Block a user