mirror of
https://github.com/bitcoin/bitcoin.git
synced 2026-03-21 13:10:08 +01:00
addrman, refactor: combine two size functions
The functionality of the old size() is covered by the new Size() when no arguments are specified, so this does not change behavior. Co-authored-by: Martin Zumsande <mzumsande@gmail.com>
This commit is contained in:
committed by
Martin Zumsande
parent
4885d6f197
commit
80f39c99ef
@@ -117,7 +117,7 @@ void FillAddrman(AddrMan& addrman, FuzzedDataProvider& fuzzed_data_provider)
|
||||
const std::chrono::seconds time_penalty{fast_random_context.randrange(100000001)};
|
||||
addrman.Add({addr}, source, time_penalty);
|
||||
|
||||
if (n > 0 && addrman.size() % n == 0) {
|
||||
if (n > 0 && addrman.Size() % n == 0) {
|
||||
addrman.Good(addr, Now<NodeSeconds>());
|
||||
}
|
||||
|
||||
@@ -304,7 +304,7 @@ FUZZ_TARGET_INIT(addrman, initialize_addrman)
|
||||
/*max_pct=*/fuzzed_data_provider.ConsumeIntegralInRange<size_t>(0, 4096),
|
||||
/*network=*/std::nullopt);
|
||||
(void)const_addr_man.Select(fuzzed_data_provider.ConsumeBool());
|
||||
(void)const_addr_man.size();
|
||||
(void)const_addr_man.Size();
|
||||
CDataStream data_stream(SER_NETWORK, PROTOCOL_VERSION);
|
||||
data_stream << const_addr_man;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user