itest: fix flake in multi-hop payments

To make this itest work reliably with multiple parallel SQL
transactions, we need to count both the settle and final HTLC
events. Otherwise, sometimes the final events from earlier
forwards are counted before the forward events from later
forwards, causing a miscount of the settle events. If we
expect both the settle and final event for each forward,
we don't miscount.
This commit is contained in:
Alex Akselrod 2024-11-18 15:28:20 -08:00
parent a0e5a14574
commit 211dd21082
No known key found for this signature in database
GPG Key ID: B32121A4F90A0EF4

View File

@ -221,11 +221,11 @@ func testMultiHopPayments(ht *lntest.HarnessTest) {
// Dave and Alice should both have forwards and settles for
// their role as forwarding nodes.
ht.AssertHtlcEvents(
daveEvents, numPayments, 0, numPayments, 0,
daveEvents, numPayments, 0, numPayments*2, 0,
routerrpc.HtlcEvent_FORWARD,
)
ht.AssertHtlcEvents(
aliceEvents, numPayments, 0, numPayments, 0,
aliceEvents, numPayments, 0, numPayments*2, 0,
routerrpc.HtlcEvent_FORWARD,
)