-
Notifications
You must be signed in to change notification settings - Fork 493
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
codec: new TxHandler byte decoder #4266
Conversation
Codecov Report
@@ Coverage Diff @@
## master #4266 +/- ##
==========================================
+ Coverage 55.18% 55.22% +0.03%
==========================================
Files 398 398
Lines 50137 50148 +11
==========================================
+ Hits 27669 27692 +23
+ Misses 20156 20141 -15
- Partials 2312 2315 +3
📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
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.
It seems like this allows for every single call to protocol.NewDecoderBytes([]byte)
to be replaced by your new NewMsgpDecoderBytes([]byte)
unless the returned decoder is being used in a weird way. Seems like all we do with them is call Decode. And if we know we are decoding msgpack data (implied by the fact we set the codec to msgp in NewDecoderBytes), there's no point in using the Decoder
type and going through reflection in Decoder.Decode() just let the Decode() on MsgpDecoderBytes
get the job done statically.
Thank you for the feedback, I'll add a |
cc0353f
to
46e5966
Compare
5c30e6a
to
ba29870
Compare
Rebased/resolved a merge conflict |
Summary
Use msgp marshaller instead of reflect in TxHandler
Test Plan
TODO: write tests