mirror of
https://github.com/PurpleI2P/i2pd.git
synced 2025-01-22 08:14:15 +00:00
Revert "check for valid LS before updating"
This reverts commit e070ce4e3493dd06c9572f7b79e3bbfb2cf30d34.
This commit is contained in:
parent
e070ce4e34
commit
3820b51960
@ -237,17 +237,19 @@ namespace data
|
|||||||
auto it = m_LeaseSets.find(ident);
|
auto it = m_LeaseSets.find(ident);
|
||||||
if (it != m_LeaseSets.end ())
|
if (it != m_LeaseSets.end ())
|
||||||
{
|
{
|
||||||
/* make sure LS is valid before updating */
|
if (it->second->IsNewer (buf, len))
|
||||||
LeaseSet ls(buf, len, false);
|
|
||||||
if(!ls.IsValid())
|
|
||||||
{
|
|
||||||
LogPrint(eLogInfo, "NetDb: Updated LeaseSet is Invalid: ", ident.ToBase32());
|
|
||||||
}
|
|
||||||
else if (it->second->IsNewer (buf, len))
|
|
||||||
{
|
{
|
||||||
it->second->Update (buf, len);
|
it->second->Update (buf, len);
|
||||||
LogPrint (eLogInfo, "NetDb: LeaseSet updated: ", ident.ToBase32());
|
if (it->second->IsValid ())
|
||||||
updated = true;
|
{
|
||||||
|
LogPrint (eLogInfo, "NetDb: LeaseSet updated: ", ident.ToBase32());
|
||||||
|
updated = true;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
LogPrint (eLogWarning, "NetDb: LeaseSet update failed: ", ident.ToBase32());
|
||||||
|
m_LeaseSets.erase (it);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
LogPrint (eLogDebug, "NetDb: LeaseSet is older: ", ident.ToBase32());
|
LogPrint (eLogDebug, "NetDb: LeaseSet is older: ", ident.ToBase32());
|
||||||
|
Loading…
x
Reference in New Issue
Block a user