Browse Source

don't check U cap

pull/1656/head
orignal 4 years ago
parent
commit
ac47c9c673
  1. 4
      libi2pd/NetDb.cpp
  2. 1
      libi2pd/RouterInfo.h

4
libi2pd/NetDb.cpp

@ -454,7 +454,7 @@ namespace data @@ -454,7 +454,7 @@ namespace data
{
auto r = std::make_shared<RouterInfo>(path);
if (r->GetRouterIdentity () && !r->IsUnreachable () &&
(!r->HasUnreachableCap () || m_LastLoad < r->GetTimestamp () + NETDB_INTRODUCEE_EXPIRATION_TIMEOUT*1000LL)) // 1 hour
(r->IsReachable () || !r->IsSSU (false) || m_LastLoad < r->GetTimestamp () + NETDB_INTRODUCEE_EXPIRATION_TIMEOUT*1000LL)) // 1 hour
{
r->DeleteBuffer ();
r->ClearProperties (); // properties are not used for regular routers
@ -584,7 +584,7 @@ namespace data @@ -584,7 +584,7 @@ namespace data
if (it.second->IsUnreachable () && total - deletedCount < NETDB_MIN_ROUTERS)
it.second->SetUnreachable (false);
// find & mark expired routers
if (it.second->HasUnreachableCap ())
if (!it.second->IsReachable () && it.second->IsSSU (false))
{
if (ts > it.second->GetTimestamp () + NETDB_INTRODUCEE_EXPIRATION_TIMEOUT*1000LL)
// RouterInfo expires after 1 hour if uses introducer

1
libi2pd/RouterInfo.h

@ -189,7 +189,6 @@ namespace data @@ -189,7 +189,6 @@ namespace data
void SetUnreachableAddressesTransportCaps (uint8_t transports); // bitmask of AddressCaps
bool IsFloodfill () const { return m_Caps & Caps::eFloodfill; };
bool IsReachable () const { return m_Caps & Caps::eReachable; };
bool HasUnreachableCap () const { return m_Caps & Caps::eUnreachable; };
bool IsSSU (bool v4only = true) const;
bool IsSSUV6 () const;
bool IsNTCP2 (bool v4only = true) const;

Loading…
Cancel
Save