Repository navigation
pyln-proto: keep every route hint when decoding an invoice - #9780
Open
takinanton wants to merge 1 commit into
Open
takinanton wants to merge 1 commit into
takinanton wants to merge 1 commit into
Conversation
Invoice.decode() replaced route_hints on each `r` field so an invoice with several of them came back with only the last one. encode() writes one `r` field per hint so even its own output did not round trip. Changelog-Fixed: pyln-proto: `Invoice.decode()` no longer drops all but the last `r` field of a BOLT11 invoice. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
This branch has not been deployed
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.
Invoice.decode()in pyln-proto assignedroute_hintsagain on everyrfield so a BOLT11 invoice with more than one came back with only the last hint.encode()writes onerfield per hint so its own output did not round trip either. Decode now keeps all of them.The new test encodes an invoice with two hints and decodes it. Before the fix it got one hint back and now it gets both. Ran the pyln-proto tests only which gives 44 passed and 1 skipped. I did not build lightningd or run the integration tests.
Checklist
Before submitting the PR, ensure the following tasks are completed. If an item is not applicable to your PR, please mark it as checked:
tools/lightning-downgrade🤖 Generated with Claude Code