Skip to content

Bolt11 cleanups, parsing fix#5891

Merged
endothermicdev merged 3 commits intoElementsProject:masterfrom
rustyrussell:bolt11-cleanups
Jan 25, 2023
Merged

Bolt11 cleanups, parsing fix#5891
endothermicdev merged 3 commits intoElementsProject:masterfrom
rustyrussell:bolt11-cleanups

Conversation

@rustyrussell
Copy link
Contributor

No description provided.

Also, we don't need to pass the total length to the field parsers,
just the length for this field (confusingly, this was called
"data_length").

Signed-off-by: Rusty Russell <[email protected]>
And make pull_bits return a uniform error message, since that's what
callers want, rather than asserting success.

Signed-off-by: Rusty Russell <[email protected]>
Changelog-Fixed: pay: don't assert() on malformed BOLT11 strings.
@rustyrussell rustyrussell added this to the v23.02 milestone Jan 12, 2023
Decode functions are now almost entirely uniform, so just use a table.

Signed-off-by: Rusty Russell <[email protected]>
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.

I tried my best to be critical, but I like these changes, especially the pull_bits error handling.

ACK f1bd932

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants