mirror of
https://github.com/bitcoin/bitcoin.git
synced 2026-03-24 14:40:12 +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:
@@ -72,11 +72,9 @@ static void AddrManAdd(benchmark::Bench& bench)
|
||||
{
|
||||
CreateAddresses();
|
||||
|
||||
CAddrMan addrman(/* deterministic */ false, /* consistency_check_ratio */ 0);
|
||||
|
||||
bench.run([&] {
|
||||
CAddrMan addrman{/* deterministic */ false, /* consistency_check_ratio */ 0};
|
||||
AddAddressesToAddrMan(addrman);
|
||||
addrman.Clear();
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user