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
Improvements to StreamReader
#318
Conversation
Can't these two commits be squashed together?
|
651eea8
to
5eadf3c
Compare
done |
Its strange that rust nightly, stable and beta are building, but 1.22 fails to solve cargo dependency on |
Because you reintroduced |
NACK #306 Everything you plan to do with a file can be done in memory via a buffer(vec/iter something else) |
@elichai got it. It was introduced to mimic real-world file reading in tests as much as possible, but it is clearly not needed with that price of security |
Codecov Report
@@ Coverage Diff @@
## master #318 +/- ##
==========================================
- Coverage 81.93% 81.93% -0.01%
==========================================
Files 38 38
Lines 6982 6981 -1
==========================================
- Hits 5721 5720 -1
Misses 1261 1261
Continue to review full report at Codecov.
|
692c819
to
749251e
Compare
@apoelstra @elichai all suggestions are accepted and added to the PR; commits were squashed; so now its ready for your re-review |
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.
Much nicer :)
ACK 749251e looks good :) |
@elichai I assume you need to complete review with a Github button in order to get this merged? |
Seems we are ready to merge this PR, all comments were addressed and two reviewers had ACK. What is the next step? |
We need another reviewer with merge access to ACK. |
@elichai it looks like we require your ACK to merge the stuff... |
Fix a C compiler warning because of redefinition of SECP256K1_BUILD
StreamReader
is now generalized to allow:TcpStream
, but any input stream, including filesRead
, which is more performance-efficient than a raw readRawMessage
, but any serializable data typenext_message
function is renamed intoread_next
embedded stream is now boxedSince the changes are compatibility-breaking, if the PR will be accepted, the version number has to be bumped accordingly.
Necessary testcase included. You can play as well with this minimalistic test parsing shortened version of the
blk00000.dat
file: https://github.com/pandoracore/bpdumpCode sample: