mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-11-11 14:38:29 +01:00
[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.
This commit is contained in:
@@ -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}
|
||||
|
||||
Reference in New Issue
Block a user