mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-11-10 14:08:40 +01:00
[tests] Remove CAddrMan.Clear() call from CAddrDB::Read()
`bool CAddrDB::Read(CAddrMan& addr, CDataStream& ssPeers)` is _only_ called from the tests, and the call to addr.Clear() only exists so that a test that Clear() is called passes. Remove that test and the call.
This commit is contained in:
@@ -244,12 +244,7 @@ bool CAddrDB::Read(CAddrMan& addr)
|
||||
|
||||
bool CAddrDB::Read(CAddrMan& addr, CDataStream& ssPeers)
|
||||
{
|
||||
bool ret = DeserializeDB(ssPeers, addr, false);
|
||||
if (!ret) {
|
||||
// Ensure addrman is left in a clean state
|
||||
addr.Clear();
|
||||
}
|
||||
return ret;
|
||||
return DeserializeDB(ssPeers, addr, false);
|
||||
}
|
||||
|
||||
void DumpAnchors(const fs::path& anchors_db_path, const std::vector<CAddress>& anchors)
|
||||
|
||||
Reference in New Issue
Block a user