mirror of
https://github.com/lightningnetwork/lnd.git
synced 2025-06-25 16:23:49 +02:00
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:
parent
a0e5a14574
commit
211dd21082
@ -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,
|
||||
)
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user