-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
p2p/pex: migrate to Protobuf #4973
Conversation
I did this slightly different from #4800. Instead of having `decodeMsg` return a `tmp2p.Message`, I instead unpack the inner `Sum` message and return that as a `proto.Message`. This makes the returned message much more ergonomic, since callers don't have to worry about the `Sum` field and enum containers, and is also more symmetrical. It might have been better for `mustEncode()` and `decodeMsg()` to simply take and return `tmp2p.Message`, since this would give us compile-time type safety, but having to deal with the enum containers everywhere is probably too painful. Too bad Go doesn't have native sum types.☹️
👋 Thanks for creating a PR! Before we can merge this PR, please make sure that all the following items have been
Thank you for your contribution to Tendermint! 🚀 |
Codecov Report
@@ Coverage Diff @@
## master #4973 +/- ##
==========================================
- Coverage 63.27% 63.23% -0.05%
==========================================
Files 188 187 -1
Lines 19587 19645 +58
==========================================
+ Hits 12394 12422 +28
- Misses 6199 6228 +29
- Partials 994 995 +1
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🌃 🎦
Description
migrate p2p/pex to protobuf
Closes: #XXX