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)
{
if (it.second->IsValid ())
{
f << it.first << ",";
if (it.second->IsIdentHash ())
@ -206,6 +208,9 @@ namespace client
f << std::endl;
num++;
}
else
LogPrint (eLogWarning, "Addressbook: invalid address ", it.first);
}
LogPrint (eLogInfo, "Addressbook: ", num, " addresses saved");
return num;
}

Loading…
Cancel
Save