Commit 492bd32
Retry user-initiated splices across restarts and disconnects
LDK does not durably record a splice until its negotiation reaches the
signature exchange, and it abandons an in-progress negotiation whenever
the peer disconnects -- which includes stopping the node. A restart or
an ill-timed disconnect after splice_in, splice_out, or
bump_channel_funding_fee returned Ok would therefore silently drop the
splice.
Persist the splice intent in a new UserChannelId-keyed channel record
store before handing the contribution to LDK, and resubmit it until the
splice locks. A startup reconciler probes LDK's live splice state to
detect dropped intents -- including those lost to a crash before LDK
persisted anything -- and the SpliceNegotiationFailed handler retries
recoverable failures, rebuilding the contribution with fresh parameters
when the stored one has gone stale. Resubmission does not require the
peer to be connected, as LDK holds the contribution and initiates
quiescence once the peer reconnects.
Event::SpliceNegotiationFailed is now emitted only once a splice is
given up on (a non-transient failure or retries exhausted) rather than
for every failed negotiation round.
Generated with assistance from Claude Code.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>1 parent bec7723 commit 492bd32
8 files changed
Lines changed: 884 additions & 15 deletions
File tree
- src
- channel
- io
- tests
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
64 | 64 | | |
65 | 65 | | |
66 | 66 | | |
67 | | - | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
68 | 70 | | |
69 | 71 | | |
70 | 72 | | |
| |||
79 | 81 | | |
80 | 82 | | |
81 | 83 | | |
82 | | - | |
83 | | - | |
84 | | - | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
85 | 87 | | |
86 | 88 | | |
87 | 89 | | |
| |||
1394 | 1396 | | |
1395 | 1397 | | |
1396 | 1398 | | |
1397 | | - | |
| 1399 | + | |
1398 | 1400 | | |
1399 | 1401 | | |
1400 | 1402 | | |
| |||
1409 | 1411 | | |
1410 | 1412 | | |
1411 | 1413 | | |
| 1414 | + | |
| 1415 | + | |
| 1416 | + | |
| 1417 | + | |
| 1418 | + | |
| 1419 | + | |
1412 | 1420 | | |
1413 | 1421 | | |
1414 | 1422 | | |
| |||
1612 | 1620 | | |
1613 | 1621 | | |
1614 | 1622 | | |
| 1623 | + | |
| 1624 | + | |
| 1625 | + | |
| 1626 | + | |
| 1627 | + | |
| 1628 | + | |
| 1629 | + | |
| 1630 | + | |
| 1631 | + | |
| 1632 | + | |
| 1633 | + | |
| 1634 | + | |
| 1635 | + | |
| 1636 | + | |
1615 | 1637 | | |
1616 | 1638 | | |
1617 | 1639 | | |
| |||
2171 | 2193 | | |
2172 | 2194 | | |
2173 | 2195 | | |
| 2196 | + | |
2174 | 2197 | | |
2175 | 2198 | | |
2176 | 2199 | | |
| |||
0 commit comments