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 |
jannotti
left a comment
There was a problem hiding this comment.
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