-
Notifications
You must be signed in to change notification settings - Fork 37.7k
refactor: Mark CAddrMan::Select and GetAddr const #21940
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. 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.
ACK fa8e3f7.
Built locally, also tried to avoid mutable
members, but all things considered, this approach seems preferable.
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.
Code-review ACK fa8e3f7
fa8e3f7
to
fa84581
Compare
Rebased |
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.
re-ACK fa84581 🦉
Checked that changes since my last ACK are only rebase-related via git range-diff fa8e3f78...fa845812
fa84581
to
fa49ab3
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.
…only once faf7623 fuzz: Call const member functions in addrman fuzz test only once (MarcoFalke) Pull request description: Logically based on #21940 Currently the fuzz test may spend a long time generating random numbers:  Fix that by calling const member functions only once. Hopefully fixes https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=34224 ACKs for top commit: practicalswift: cr ACK faf7623: touches only `src/test/fuzz/addrman.cpp` Tree-SHA512: 0fe9e0111eb1706fc39bd2f90d4b87a771882bada54c01e96d8e79c2afca2f1081139d5ab680285a81835cc5142e74ada422a181db34b01904975d1e167e64c2
Rebased and added one commit |
fa49ab3
to
fa35236
Compare
fa35236
to
faecfad
Compare
faecfad
to
fa47bdd
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.
Code Review ACK and Tested ACK fa47bdd on Ubuntu 20.04.
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.
re-ACK fa47bdd
Checked again that changes since my last re-ACK are only rebase-related via git range-diff fa49ab3...fa47bddd
(plus the fuzzing related extra commit)
fa47bdd
to
fab755b
Compare
Force pushed to add comment |
It already is. (Adjusted title) |
Concept ACK. Perhaps this deserves a comment in addrman.h though, to state that even |
a04e835
to
5555a1d
Compare
Added a lock annotation to the mutable member, which can be "read" by compilers and developers |
Leaving it as-is would be annoying because some editor fix-up the spacing when opening a file or editing it.
5555a1d
to
fae108c
Compare
Code review ACK fae108c |
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.
re-ACK fae108c 🍦
Checked via git range-diff fa47bddd...fae108ce
that there were only minor changes (comment on vRandom, as suggested by jnewbery) and rebase on master since my last ACK
Did any of the reviewers test this change with DEBUG_ADDRMAN defined? It blows up for me.
|
I created a fix in #22601 , because I didn't see the comment here. |
Thanks, in the meantime will cherry-pick this commit locally. |
Oops, no, I didn't :( thanks for catching this. Would it make sense to have a CI instance with DEBUG_ADDRMAN defined or is that overambitious? 🤔 |
fae108c Fix incorrect whitespace in addrman (MarcoFalke) fa32024 Add missing GUARDED_BY to CAddrMan::insecure_rand (MarcoFalke) fab755b fuzz: Actually use const addrman (MarcoFalke) fae0c79 refactor: Mark CAddrMan::GetAddr const (MarcoFalke) fa02934 refactor: Mark CAddrMan::Select const (MarcoFalke) Pull request description: To clarify that a call to this only changes the random state and nothing else. ACKs for top commit: jnewbery: Code review ACK fae108c theStack: re-ACK fae108c 🍦 Tree-SHA512: 3ffb211d4715cc3daeb3bfcdb3fcc6b108ca96df5fa565510436fac0e8da86c93b30c9c4aad0563e27d84f615fcd729481072009a4e2360c8b3d40787ab6506a
To clarify that a call to this only changes the random state and nothing else.