Skip to content

Commit

Permalink
itest: add more comprehensive assertions before HTLC cleared check
Browse files Browse the repository at this point in the history
We mine quite a few blocks in this test to trigger a htlc timeout,
so it can be pretty slow. This fix adds assertions for additional
"state steps" that happen in between the failing of the htlc on-chain
and asserting that we're fully cleared out so that slower running
machines won't timeout.
  • Loading branch information
carlaKC committed Apr 27, 2024
1 parent ded995a commit 6e3a46e
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion itest/lnd_route_blinding_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -1018,10 +1018,14 @@ func testErrorHandlingOnChainFailure(ht *lntest.HarnessTest) {
// suspended Carol we don't need to account for her commitment output
// claim.
ht.Miner.MineBlocksAndAssertNumTxes(1, 1)
ht.AssertNumPendingSweeps(ht.Bob, 0)

// Assert that the HTLC has cleared.
ht.AssertHTLCNotActive(ht.Alice, testCase.channels[0], hash[:])
ht.WaitForBlockchainSync(ht.Bob)
ht.WaitForBlockchainSync(ht.Alice)

ht.AssertHTLCNotActive(ht.Bob, testCase.channels[0], hash[:])
ht.AssertHTLCNotActive(ht.Alice, testCase.channels[0], hash[:])

// Wait for the HTLC to reflect as failed for Alice.
paymentStream := ht.Alice.RPC.TrackPaymentV2(hash[:])
Expand Down

0 comments on commit 6e3a46e

Please sign in to comment.