Skip to content

tests: wait for the channel_ready retransmission on the node that disconnected - #9645

Merged
daywalker90 merged 1 commit into
ElementsProject:masterfrom
ksedgwic:reconnect-no-update-wait-on-disconnecting-node
Oct 26, 2026
Merged

daywalker90 merged 1 commit into
ElementsProject:masterfrom
ksedgwic:reconnect-no-update-wait-on-disconnecting-node

Conversation

@ksedgwic

Copy link
Copy Markdown
Collaborator

test_reconnect_no_update waited for the first node to retransmit channel_ready after the second node's scripted disconnect, but a node only retransmits if it had sent channel_ready before the disconnect, and when the second node reaches the funding depth first the first node has nothing to retransmit. Wait on the second node, which has always sent it by the time it reconnects. The later wait for a second retransmission after the close was only ever satisfied by that first one, since the fee update after lock-in advances the commitment numbers; it now waits for the reconnect in the closing state instead.

Fixes #9644

Comment thread tests/test_connection.py
Comment thread tests/test_connection.py Outdated
…connected

test_reconnect_no_update waited for l1 to log "Retransmitting
channel_ready" after l2's scripted disconnect on sending channel_ready.
channeld, and dualopend in the dual-funding variant, retransmit only
when the node had sent channel_ready before the disconnect, which
lightningd derives from the channel's scid being known. When l2
reaches the funding depth and disconnects before l1 has seen the
block, l1 sends its channel_ready for the first time after the
reconnect, nothing is retransmitted on l1, and the wait times out.

Wait on l2 instead: it has sent channel_ready by the time it
reconnects, whichever node saw the block first. With dual funding
the retransmission comes from l2's dualopend, or from channeld when
l1's channel_ready arrived before l2 reached the depth and dualopend
had already handed the channel over, so the wait does not name the
daemon.

The second wait on l2, after the close, was only ever satisfied by
that same first retransmission: the fee update after lock-in advances
the commitment numbers, after which channel_ready is not retransmitted.
Wait for the reconnect in the closing state instead, which is what
that part of the test covers. l2 is in CHANNELD_SHUTTING_DOWN or
already in CLOSINGD_SIGEXCHANGE then, depending on whether its
channeld reported both shutdowns before the disconnect took it down,
so accept either.

Fixes: ElementsProject#9644
Changelog-None
@ksedgwic
ksedgwic force-pushed the reconnect-no-update-wait-on-disconnecting-node branch from 9599676 to ba18c0d Compare October 23, 2026 17:09
@ksedgwic

Copy link
Copy Markdown
Collaborator Author

Both applied: one wait on l2 for "Retransmitting channel_ready" without the daemon name, and the reconnect wait accepts CHANNELD_SHUTTING_DOWN or CLOSINGD_SIGEXCHANGE. The dual-fund job had caught the first one as well: when l1's channel_ready arrives before l2 reaches the depth, dualopend hands over to channeld before the scripted disconnect, so the retransmission on l2 comes from channeld.

@ksedgwic
ksedgwic requested a review from daywalker90 October 23, 2026 17:12
@daywalker90
daywalker90 merged commit ea94edd into ElementsProject:master Oct 26, 2026
45 checks passed
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.

test_reconnect_no_update waits for a channel_ready retransmission the first node may never send

2 participants