diff options
author | John Newbery <john@johnnewbery.com> | 2021-08-05 14:08:48 +0100 |
---|---|---|
committer | John Newbery <john@johnnewbery.com> | 2021-08-19 11:26:53 +0100 |
commit | 406be5ff9699874dc1d38d11f036e33cbdb820c9 (patch) | |
tree | 4637e90a588ec23dcff5d539ecef3319dcb25eaa /src/addrman.h | |
parent | ed9ba8af08f857bda3ce2f77413317374c22d7b4 (diff) |
[addrman] Remove all public uses of CAddrMan.Clear() from the tests
Just use unique_ptr<CAddrMan>s and reset the pointer if a frest addrman is required.
Also make CAddrMan::Clear() private to ensure that no call sites are missed.
Diffstat (limited to 'src/addrman.h')
-rw-r--r-- | src/addrman.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/addrman.h b/src/addrman.h index fa155fb00a..c2df87e986 100644 --- a/src/addrman.h +++ b/src/addrman.h @@ -471,6 +471,7 @@ public: Check(); } +private: void Clear() EXCLUSIVE_LOCKS_REQUIRED(!cs) { @@ -496,6 +497,7 @@ public: mapAddr.clear(); } +public: explicit CAddrMan(bool deterministic, int32_t consistency_check_ratio) : insecure_rand{deterministic}, m_consistency_check_ratio{consistency_check_ratio} |