Remove confusing CAddrDB

The class only stores the file path, reading it from a global. Globals
are confusing and make testing harder.

The method reading from a stream does not even use any class members, so
putting it in a class is also confusing.
This commit is contained in:
MarcoFalke
2021-08-21 11:22:21 +02:00
parent fa7f77b7d1
commit fade9a1a4d
6 changed files with 22 additions and 33 deletions

View File

@@ -1749,8 +1749,7 @@ void CConnman::DumpAddresses()
{
int64_t nStart = GetTimeMillis();
CAddrDB adb;
adb.Write(addrman);
DumpPeerAddresses(::gArgs, addrman);
LogPrint(BCLog::NET, "Flushed %d addresses to peers.dat %dms\n",
addrman.size(), GetTimeMillis() - nStart);