mirror of
https://github.com/PurpleI2P/i2pd.git
synced 2025-01-22 04:04:16 +00:00
don't save invalid addreses
This commit is contained in:
parent
6fec92c012
commit
e7ff6fbffc
@ -198,13 +198,18 @@ namespace client
|
||||
|
||||
for (const auto& it: addresses)
|
||||
{
|
||||
f << it.first << ",";
|
||||
if (it.second->IsIdentHash ())
|
||||
f << it.second->identHash.ToBase32 ();
|
||||
if (it.second->IsValid ())
|
||||
{
|
||||
f << it.first << ",";
|
||||
if (it.second->IsIdentHash ())
|
||||
f << it.second->identHash.ToBase32 ();
|
||||
else
|
||||
f << it.second->blindedPublicKey->ToB33 ();
|
||||
f << std::endl;
|
||||
num++;
|
||||
}
|
||||
else
|
||||
f << it.second->blindedPublicKey->ToB33 ();
|
||||
f << std::endl;
|
||||
num++;
|
||||
LogPrint (eLogWarning, "Addressbook: invalid address ", it.first);
|
||||
}
|
||||
LogPrint (eLogInfo, "Addressbook: ", num, " addresses saved");
|
||||
return num;
|
||||
|
Loading…
x
Reference in New Issue
Block a user