Repository navigation
Conversation
|
I've assigned @tnull as a reviewer! |
The client closes its JIT channel right after `PaymentReceived`, while it may still be persisting the monitor updates for settling the HTLC it just claimed. LDK won't begin a cooperative shutdown while a monitor update is in flight, so under load `close_channel` failed with `ChannelClosingFailed`. Retry it until the updates are through, polling like the test already does for the pruning. This change was written with the assistance of Claude Code. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Jolah1
force-pushed
the
fix-lsps2-prune-test-close-race
branch
from
November 24, 2026 07:02
9405a02 to
ad5a05c
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #1256.
The test closes the JIT channel right after the client's
PaymentReceived, while the client may still be persisting the monitor updates for settling the HTLC it just claimed. LDK won't begin a cooperative shutdown while amonitor update is in flight, so
close_channeloccasionally fails withChannelClosingFailed. The test now retries the close until the updates are through, polling for up toINTEROP_TIMEOUT_SECSlike it already does for thepruning. Retrying is safe, as LDK returns this error before changing any channel state.
This is the same race
do_channel_full_cycleworks around with the 1s sleep before its cooperative close, added in b088b35 when we switched to deferred monitor writes.Testing: with the client's monitor writes temporarily delayed so the close lands inside the window, the test failed 3/3 without the change and passed 3/3 with it (details in the issue). All
lsps2integration tests pass.Co-authored with Claude Code