fuzz: Use ConsumeWeakEnum in addrman for service flags#21487
fuzz: Use ConsumeWeakEnum in addrman for service flags#21487maflcko merged 1 commit intobitcoin:masterfrom
Conversation
|
I am also thinking about renaming this to |
|
Concept ACK on both using Better naming will be helpful for future generations of Bitcoin Core fuzzing enthusiasts, and |
|
Tested ACK 5555446 |
vasild
left a comment
There was a problem hiding this comment.
ACK 5555446
I think the existent name "...weak...()" is good because the function may return a completely arbitrary value that is not in the enum. ConsumeEnumFlags() may give the wrong impression that it only returns enumerated values.
|
Though, "weak" could also be interpreted as "weakly typed enum", meaning a non-C++11-"strongly typed enum". But this interpretation would be wrong because flags can also be implemented with strongly typed enums. Maybe there is a better name that we haven't yet thought of? |
|
On really verbose name could be |
|
… flags 5555446 fuzz: Use ConsumeWeakEnum in addrman for service flags (MarcoFalke) Pull request description: This has minimally better performance. Reported by me in bitcoin#20228 (comment) ACKs for top commit: practicalswift: Tested ACK 5555446 vasild: ACK 5555446 Tree-SHA512: 4e5f51fe4f2bd7b2f37d0690e41203341ba45c0c9bc9247449cd26cfb5f77dc2ec61df3e4963276f68694e4b3ca3d0a76367a51c4d775501edeb3224d305a261
This has minimally better performance. Reported by me in #20228 (comment)