mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-01-25 10:43:19 -03:00
Merge #21487: fuzz: Use ConsumeWeakEnum in addrman for service flags
55554463c1
fuzz: Use ConsumeWeakEnum in addrman for service flags (MarcoFalke) Pull request description: This has minimally better performance. Reported by me in https://github.com/bitcoin/bitcoin/pull/20228#discussion_r598081787 ACKs for top commit: practicalswift: Tested ACK55554463c1
vasild: ACK55554463c1
Tree-SHA512: 4e5f51fe4f2bd7b2f37d0690e41203341ba45c0c9bc9247449cd26cfb5f77dc2ec61df3e4963276f68694e4b3ca3d0a76367a51c4d775501edeb3224d305a261
This commit is contained in:
commit
d400e672a0
1 changed files with 1 additions and 1 deletions
|
@ -104,7 +104,7 @@ FUZZ_TARGET_INIT(addrman, initialize_addrman)
|
|||
[&] {
|
||||
const std::optional<CService> opt_service = ConsumeDeserializable<CService>(fuzzed_data_provider);
|
||||
if (opt_service) {
|
||||
addr_man.SetServices(*opt_service, ServiceFlags{fuzzed_data_provider.ConsumeIntegral<uint64_t>()});
|
||||
addr_man.SetServices(*opt_service, ConsumeWeakEnum(fuzzed_data_provider, ALL_SERVICE_FLAGS));
|
||||
}
|
||||
},
|
||||
[&] {
|
||||
|
|
Loading…
Add table
Reference in a new issue