refactor: Mark CAddrMan::Select and GetAddr const#21940
refactor: Mark CAddrMan::Select and GetAddr const#21940maflcko merged 5 commits intobitcoin:masterfrom
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. |
promag
left a comment
There was a problem hiding this comment.
ACK fa8e3f78751d80fa8bce957387bfc95802af2477.
Built locally, also tried to avoid mutable members, but all things considered, this approach seems preferable.
theStack
left a comment
There was a problem hiding this comment.
Code-review ACK fa8e3f78751d80fa8bce957387bfc95802af2477
fa8e3f7 to
fa84581
Compare
|
Rebased |
theStack
left a comment
There was a problem hiding this comment.
re-ACK fa845812d94ec6adc13459dca708b0850a3059ca 🦉
Checked that changes since my last ACK are only rebase-related via git range-diff fa8e3f78...fa845812
fa84581 to
fa49ab3
Compare
…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
theStack
left a comment
There was a problem hiding this comment.
re-ACK fa47bdddbc7fc153c36f8f700099656ec1ce9d5d
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 |
|
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.