Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix skimmed fee serialization in Channel #2735

Merged

Conversation

valentinewallace
Copy link
Contributor

@valentinewallace valentinewallace commented Nov 15, 2023

Previously, if some holding cell HTLCs had skimmed fees present and some
didn't, we would fail to deserialize a Channel. See added test coverage. Indirectly pointed out by Matt here.

Just the last commit. Based on #2540 for ease of testing.

@TheBlueMatt
Copy link
Collaborator

LGTM

Previously, if some holding cell HTLCs have skimmed fees present and some
don't, we would fail to deserialize a Channel. See added test coverage.
@valentinewallace
Copy link
Contributor Author

Rebased.

Copy link
Collaborator

@TheBlueMatt TheBlueMatt left a comment

Choose a reason for hiding this comment

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

I'm fine with the simpler code, but we could also fix it with just replacing the for _ in 0..idxs with for _ in 1..idx.

@TheBlueMatt
Copy link
Collaborator

Gonna go ahead and land this. The excess few bytes in ChannelManager serialization aren't really worth sweating, the tests demonstrate the error, and the new code is much simpler.

@TheBlueMatt TheBlueMatt merged commit 78e88e9 into lightningdevkit:main Dec 5, 2023
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.

2 participants