[addrman] Set m_asmap in CAddrMan initializer list

This allows us to make it const.
This commit is contained in:
John Newbery
2021-08-24 11:27:05 +01:00
parent 593247872d
commit f572f2b204
10 changed files with 38 additions and 36 deletions

View File

@@ -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()
{