-
Notifications
You must be signed in to change notification settings - Fork 3.3k
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
op-node: Fix Frame
parsing
#4867
Conversation
|
Is it worth making |
Definitely think this is a good idea to reduce code duplication! |
It would definitely be nice, but looking at the Is there any other place in the code where random frames would be used, except for the tests I added here? |
Codecov Report
Additional details and impacted files@@ Coverage Diff @@
## develop #4867 +/- ##
===========================================
- Coverage 39.89% 35.90% -4.00%
===========================================
Files 307 181 -126
Lines 18590 15359 -3231
Branches 761 0 -761
===========================================
- Hits 7417 5514 -1903
+ Misses 10597 9273 -1324
+ Partials 576 572 -4
Flags with carried forward coverage won't be shown. Click here to find out more. |
4cd2947
to
72f24f1
Compare
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.
I love seeing more tests
This PR has been added to the merge queue, and will be merged soon. |
This PR is next in line to be merged, and will be merged as soon as checks pass. |
Description
This PR fixes the binary-unmarshaling of
Frame
s. The last byte of an encoded frame could be missing and would still have passed as a valid frame.Function
Frame.UnmarshalBinary
now does proper error checks to ensure all frame data is present in an encoded frame. It also convertsio.EOF
errors that happen intermediately intoio.ErrUnexpectedEOF
errors, which is more idiomatic.Tests
Added:
is_last
.ParseFrames
for truncated last frame.Metadata
#279
)