don't save invalid addreses

pull/1550/head
orignal 4 years ago
parent 6fec92c012
commit e7ff6fbffc

@ -197,6 +197,8 @@ namespace client
} }
for (const auto& it: addresses) for (const auto& it: addresses)
{
if (it.second->IsValid ())
{ {
f << it.first << ","; f << it.first << ",";
if (it.second->IsIdentHash ()) if (it.second->IsIdentHash ())
@ -206,6 +208,9 @@ namespace client
f << std::endl; f << std::endl;
num++; num++;
} }
else
LogPrint (eLogWarning, "Addressbook: invalid address ", it.first);
}
LogPrint (eLogInfo, "Addressbook: ", num, " addresses saved"); LogPrint (eLogInfo, "Addressbook: ", num, " addresses saved");
return num; return num;
} }

Loading…
Cancel
Save