Fix BOLT11 annotation loss after sendonion failure#8690
Merged
rustyrussell merged 1 commit intoElementsProject:masterfrom Nov 24, 2025
Merged
Fix BOLT11 annotation loss after sendonion failure#8690rustyrussell merged 1 commit intoElementsProject:masterfrom
rustyrussell merged 1 commit intoElementsProject:masterfrom
Conversation
Contributor
|
Hmm, maybe we should do this differently? Only set the flag to true when sendonion succeeds? Sure, that means we will have redundant strings, but it will always be set? |
40eaa38 to
5768ebd
Compare
Contributor
Author
|
moved the flag setting to |
5768ebd to
46683f4
Compare
Fixes ElementsProject#6978 where bolt11 annotations were lost when sendonion failed early and payment was retried. When sendonion RPC fails before saving payment to database, invstring_used flag would remain true, causing retry attempts to omit bolt11 parameter. Successful retries would then save to DB without bolt11 annotation. Move invstring_used flag setting from payment_createonion_success to payment_sendonion_success. This ensures the flag is only set after sendonion actually succeeds. The bolt11 will be sent with every sendonion attempt until the first successful one, accepting the minor redundancy for cleaner state management. Changelog-Fixed: Plugins: `listpays` can be missing the bolt11 information in some cases where `pay` is used.
46683f4 to
a11b5e6
Compare
Contributor
|
Great! I added a Changelog-Fixed line to the commit message, too. |
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 #6978 - Implements @rustyrussell's recommended fix to reset invstring_used flag on sendonion failure.