aboutsummaryrefslogtreecommitdiff
path: root/src/bench/addrman.cpp
diff options
context:
space:
mode:
authorJohn Newbery <john@johnnewbery.com>2020-07-23 15:34:40 +0100
committerJohn Newbery <john@johnnewbery.com>2020-08-12 09:22:07 +0100
commitf26502e9fc8a669b30717525597e3f468eaecf79 (patch)
tree828ca2eb39f9889bab4d2fb6ca09126d790883fc /src/bench/addrman.cpp
parent3c93623be20d534bb653410db03d38152135e2e6 (diff)
downloadbitcoin-f26502e9fc8a669b30717525597e3f468eaecf79.tar.xz
[addrman] Specify max addresses and pct when calling GetAddresses()
CAddrMan.GetAddr() would previously limit the number and percentage of addresses returned (to ADDRMAN_GETADDR_MAX (1000) and ADDRMAN_GETADDR_MAX_PCT (23) respectively). Instead, make it the callers responsibility to specify the maximum addresses and percentage they want returned. For net_processing, the maximums are MAX_ADDR_TO_SEND (1000) and MAX_PCT_ADDR_TO_SEND (23). For rpc/net, the maximum is specified by the client.
Diffstat (limited to 'src/bench/addrman.cpp')
-rw-r--r--src/bench/addrman.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/bench/addrman.cpp b/src/bench/addrman.cpp
index 26d9340768..ebdad5a4b8 100644
--- a/src/bench/addrman.cpp
+++ b/src/bench/addrman.cpp
@@ -98,7 +98,7 @@ static void AddrManGetAddr(benchmark::Bench& bench)
FillAddrMan(addrman);
bench.run([&] {
- const auto& addresses = addrman.GetAddr();
+ const auto& addresses = addrman.GetAddr(2500, 23);
assert(addresses.size() > 0);
});
}