-
Notifications
You must be signed in to change notification settings - Fork 38.6k
refactor: Use HashWriter over legacy CHashWriter #28341
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
Conversation
|
The following sections might be updated with supplementary metadata relevant to reviewers and maintainers. ReviewsSee the guideline for information on the review process.
If your review is incorrectly listed, please react with 👎 to this comment and the bot will ignore it on the next update. ConflictsReviewers, this pull request conflicts with the following ones:
If you consider this pull request important, please also help to review the conflicting pull requests. Ideally, start with the one that should be merged first. |
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.
Concept ACK. Changes look good.
Why not get test/addrman_tests.cpp at the same time?
theuni
left a comment
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 don't know if I just missed it when I first looked or if you did some ninja force push, but addrman_tests.cpp is updated here so ignore my previous comment.
ACK 99995cf
sedited
left a comment
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.
ACK 99995cf
|
I'm not sure this improves much, unless we can actually get rid of That said, code review ACK 99995cf |
It is still used in |
99995cf refactor: Use HashWriter over legacy CHashWriter (via SerializeHash) (MarcoFalke) 5555aa2 refactor: Use HashWriter over legacy CHashWriter (MarcoFalke) Pull request description: `HashWriter` is a slim and less confusing version of `CHashWriter`, so use it in all places where it compiles. This should be correct, if it compiles. ACKs for top commit: sipa: That said, code review ACK 99995cf theuni: ACK 99995cf TheCharlatan: ACK 99995cf Tree-SHA512: fc967a18379bd00bd334ac3d50beb5435b65ca66a48f72623f1dcdbbce3292fd91839160cd0e69b8f4f3d98e258dcbbc6f73f5e91345f938898ee39c903a442b
…ible Summary: ``` The basic idea is that serialization type should not be initialized when it is not needed. Same for the serialization version. So do this here for HashWriter. CHashWriter remains in places where it is not yet possible. ``` Backport of [[bitcoin/bitcoin#25331 | core#25331]] and [[bitcoin/bitcoin#28341 | core#28341]]. Test Plan: ninja all check-extended Reviewers: #bitcoin_abc, roqqit, PiRK Reviewed By: #bitcoin_abc, roqqit, PiRK Subscribers: roqqit Differential Revision: https://reviews.bitcoinabc.org/D16472
…ible Summary: ``` The basic idea is that serialization type should not be initialized when it is not needed. Same for the serialization version. So do this here for HashWriter. CHashWriter remains in places where it is not yet possible. ``` Backport of [[bitcoin/bitcoin#25331 | core#25331]] and [[bitcoin/bitcoin#28341 | core#28341]]. Test Plan: ninja all check-extended Reviewers: #bitcoin_abc, roqqit, PiRK Reviewed By: #bitcoin_abc, roqqit, PiRK Subscribers: roqqit Differential Revision: https://reviews.bitcoinabc.org/D16472
HashWriteris a slim and less confusing version ofCHashWriter, so use it in all places where it compiles.This should be correct, if it compiles.