Browse Source

resseed if too few floodfills

pull/1693/head
orignal 3 years ago
parent
commit
20652f7995
  1. 4
      libi2pd/NetDb.cpp

4
libi2pd/NetDb.cpp

@ -55,8 +55,10 @@ namespace data
Load (); Load ();
uint16_t threshold; i2p::config::GetOption("reseed.threshold", threshold); uint16_t threshold; i2p::config::GetOption("reseed.threshold", threshold);
if (m_RouterInfos.size () < threshold) // reseed if # of router less than threshold if (m_RouterInfos.size () < threshold || m_Floodfills.size () < NETDB_MIN_FLOODFILLS) // reseed if # of router less than threshold or too few floodfiils
{
Reseed (); Reseed ();
}
else if (!GetRandomRouter (i2p::context.GetSharedRouterInfo (), false)) else if (!GetRandomRouter (i2p::context.GetSharedRouterInfo (), false))
Reseed (); // we don't have a router we can connect to. Trying to reseed Reseed (); // we don't have a router we can connect to. Trying to reseed

Loading…
Cancel
Save