Skip to content

Fix listpays still pending when using xpay/injectpaymentonion#8635

Merged
rustyrussell merged 2 commits intoElementsProject:masterfrom
rustyrussell:guilt/listpays-still-pending
Nov 4, 2025
Merged

Fix listpays still pending when using xpay/injectpaymentonion#8635
rustyrussell merged 2 commits intoElementsProject:masterfrom
rustyrussell:guilt/listpays-still-pending

Conversation

@rustyrussell
Copy link
Contributor

Fixes: #8629

There was a corner case where we created a pending payment but then didn't create an outgoing htlc (most simply, when the peer wasn't connected!). Test that, and fix the ordering, then finally add a db migration which cleans up any previous ones.

…t queue it to the channeld for the peer.

Signed-off-by: Rusty Russell <[email protected]>
@rustyrussell rustyrussell added this to the v25.12 milestone Oct 27, 2025
…sendpays "pending".

If we failed after we register (e.g. channeld not available), we don't
mark it failed.  We shouldn't register until we've definitely created
the htlc.

Changelog-Fixed: `xpay` would sometimes leave payment parts status `pending` in failure cases (as seen in listpays or listsendpays).
Signed-off-by: Rusty Russell <[email protected]>
Fixes: ElementsProject#8629
Copy link
Collaborator

@endothermicdev endothermicdev left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ACK 725b864

@rustyrussell rustyrussell merged commit ac60568 into ElementsProject:master Nov 4, 2025
38 of 39 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.

Payment without HTLCs marked as pending

2 participants