aboutsummaryrefslogtreecommitdiff
path: root/src/bench
diff options
context:
space:
mode:
authorJohn Newbery <john@johnnewbery.com>2021-08-24 11:27:05 +0100
committerJohn Newbery <john@johnnewbery.com>2021-08-27 10:55:41 +0100
commitf572f2b2048994b3b50f4cfd5de19e40b1acfb22 (patch)
treef81adee0eac69d5d99be3b8b4f8b1f9e756169f6 /src/bench
parent593247872decd6d483a76e96d79433247226ad14 (diff)
downloadbitcoin-f572f2b2048994b3b50f4cfd5de19e40b1acfb22.tar.xz
[addrman] Set m_asmap in CAddrMan initializer list
This allows us to make it const.
Diffstat (limited to 'src/bench')
-rw-r--r--src/bench/addrman.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/bench/addrman.cpp b/src/bench/addrman.cpp
index d69a651811..8fbb68c04c 100644
--- a/src/bench/addrman.cpp
+++ b/src/bench/addrman.cpp
@@ -73,14 +73,14 @@ static void AddrManAdd(benchmark::Bench& bench)
CreateAddresses();
bench.run([&] {
- CAddrMan addrman{/* deterministic */ false, /* consistency_check_ratio */ 0};
+ CAddrMan addrman{/* asmap */ std::vector<bool>(), /* deterministic */ false, /* consistency_check_ratio */ 0};
AddAddressesToAddrMan(addrman);
});
}
static void AddrManSelect(benchmark::Bench& bench)
{
- CAddrMan addrman(/* deterministic */ false, /* consistency_check_ratio */ 0);
+ CAddrMan addrman(/* asmap */ std::vector<bool>(), /* deterministic */ false, /* consistency_check_ratio */ 0);
FillAddrMan(addrman);
@@ -92,7 +92,7 @@ static void AddrManSelect(benchmark::Bench& bench)
static void AddrManGetAddr(benchmark::Bench& bench)
{
- CAddrMan addrman(/* deterministic */ false, /* consistency_check_ratio */ 0);
+ CAddrMan addrman(/* asmap */ std::vector<bool>(), /* deterministic */ false, /* consistency_check_ratio */ 0);
FillAddrMan(addrman);
@@ -114,7 +114,7 @@ static void AddrManGood(benchmark::Bench& bench)
std::vector<std::unique_ptr<CAddrMan>> addrmans(addrman_count);
for (size_t i{0}; i < addrman_count; ++i) {
- addrmans[i] = std::make_unique<CAddrMan>(/* deterministic */ false, /* consistency_check_ratio */ 0);
+ addrmans[i] = std::make_unique<CAddrMan>(/* asmap */ std::vector<bool>(), /* deterministic */ false, /* consistency_check_ratio */ 0);
FillAddrMan(*addrmans[i]);
}