aboutsummaryrefslogtreecommitdiff
path: root/src/addrman.h
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/addrman.h
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/addrman.h')
-rw-r--r--src/addrman.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/addrman.h b/src/addrman.h
index e2cb60b061..f9c12ba3f9 100644
--- a/src/addrman.h
+++ b/src/addrman.h
@@ -195,7 +195,7 @@ public:
//
// If a new asmap was provided, the existing records
// would be re-bucketed accordingly.
- std::vector<bool> m_asmap;
+ const std::vector<bool> m_asmap;
// Read asmap from provided binary file
static std::vector<bool> DecodeAsmap(fs::path path);
@@ -471,7 +471,7 @@ public:
Check();
}
- explicit CAddrMan(bool deterministic, int32_t consistency_check_ratio);
+ explicit CAddrMan(std::vector<bool> asmap, bool deterministic, int32_t consistency_check_ratio);
~CAddrMan()
{