Skip to content

Send splice_locked if necessary while reconnecting#3318

Merged
t-bast merged 2 commits into
masterfrom
splice-locked-syncing
Jun 11, 2026
Merged

Send splice_locked if necessary while reconnecting#3318
t-bast merged 2 commits into
masterfrom
splice-locked-syncing

Conversation

@t-bast

@t-bast t-bast commented Jun 11, 2026

Copy link
Copy Markdown
Member

When we lock a commitment while reconnecting (because the funding/splice transaction confirms or when we're using zero-conf), we currently have a bug where if we've sent our channel_reestablish but we haven't received the remote channel_reestablish, we will not send splice_locked which results in a mismatch in the expected number of commit_sig messages for our peer, triggering a force-close.

This is simply because we didn't handle the event correctly in the SYNCING state: we used the same handler as the OFFLINE state, in which we updated our internal state but didn't send any message out. We now send splice_locked in that case, which fixes this issue.

t-bast added 2 commits June 11, 2026 10:50
When we lock a commitment while reconnecting, we currently have a bug
where if we've sent our `channel_reestablish` but we haven't received
the remote `channel_reestablish`, we will not send `splice_locked`
which results in a mismatch in the expected number of `commit_sig`
messages for our peer, triggering a force-close.

We add a failing test that showcases this bug.
We now send `splice_locked` when we are in the `SYNCING` state when
that makes sense. The logic is very similar to the `NORMAL` state,
but we don't emit events that are meant to be used when the channel
is ready to handle payments.
@t-bast t-bast requested a review from pm47 June 11, 2026 09:23
@t-bast t-bast merged commit 7fb62fc into master Jun 11, 2026
1 check passed
@t-bast t-bast deleted the splice-locked-syncing branch June 11, 2026 09:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants