diff options
author | John Newbery <john@johnnewbery.com> | 2021-08-24 11:27:05 +0100 |
---|---|---|
committer | John Newbery <john@johnnewbery.com> | 2021-08-27 10:55:41 +0100 |
commit | f572f2b2048994b3b50f4cfd5de19e40b1acfb22 (patch) | |
tree | f81adee0eac69d5d99be3b8b4f8b1f9e756169f6 /src/addrman.cpp | |
parent | 593247872decd6d483a76e96d79433247226ad14 (diff) |
[addrman] Set m_asmap in CAddrMan initializer list
This allows us to make it const.
Diffstat (limited to 'src/addrman.cpp')
-rw-r--r-- | src/addrman.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/addrman.cpp b/src/addrman.cpp index edcf97f846..03818213fe 100644 --- a/src/addrman.cpp +++ b/src/addrman.cpp @@ -77,8 +77,9 @@ double CAddrInfo::GetChance(int64_t nNow) const return fChance; } -CAddrMan::CAddrMan(bool deterministic, int32_t consistency_check_ratio) - : insecure_rand{deterministic} +CAddrMan::CAddrMan(std::vector<bool> asmap, bool deterministic, int32_t consistency_check_ratio) + : m_asmap{std::move(asmap)} + , insecure_rand{deterministic} , nKey{deterministic ? uint256{1} : insecure_rand.rand256()} , m_consistency_check_ratio{consistency_check_ratio} { |