Skip to content

Serialization Framework Tweaks #185

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

Merged
merged 6 commits into from
Sep 18, 2018

Conversation

TheBlueMatt
Copy link
Collaborator

@TheBlueMatt TheBlueMatt commented Sep 16, 2018

Sadly a huge diff for only minor tweaks.

  • First expose the serialization framework with some docs since it'll be needed for ChannelMonitor/ChannelManager serialization sooner or later anyway.
  • Second, remove the newtype wrapper around std::io::Read/Write that wasn't really doing anything.
  • Third, add size_hinting and fix little ineffeiency TODOs from the original serialization PR.
  • Fourth, fix a bug introduced in the original serialization PR that caused messages to be encoded with their length instead of their message type.
  • Finally, use the size_hinting in peer_handler and check that it never underestimates in fuzz testing.

@TheBlueMatt TheBlueMatt force-pushed the 2018-09-ser-rework branch 3 times, most recently from c383d82 to c497e85 Compare September 16, 2018 18:08
@TheBlueMatt TheBlueMatt merged commit e0fad3f into lightningdevkit:master Sep 18, 2018
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.

1 participant