diff --git a/Config.cpp b/Config.cpp index bf6080a1..0ed09ae8 100644 --- a/Config.cpp +++ b/Config.cpp @@ -165,6 +165,7 @@ namespace config { options_description reseed("Reseed options"); reseed.add_options() ("reseed.verify", value()->default_value(false), "Verify .su3 signature") + ("reseed.threshold", value()->default_value(25), "Minimum number of known routers before requesting reseed") ("reseed.floodfill", value()->default_value(""), "Path to router info of floodfill to reseed from") ("reseed.file", value()->default_value(""), "Path to local .su3 file or HTTPS URL to reseed from") ("reseed.zipfile", value()->default_value(""), "Path to local .zip file to reseed from") diff --git a/NetDb.cpp b/NetDb.cpp index e246cb7b..b4ad6399 100644 --- a/NetDb.cpp +++ b/NetDb.cpp @@ -41,7 +41,9 @@ namespace data InitProfilesStorage (); m_Families.LoadCertificates (); Load (); - if (m_RouterInfos.size () < 25) // reseed if # of router less than 50 + + uint16_t threshold; i2p::config::GetOption("reseed.threshold", threshold); + if (m_RouterInfos.size () < threshold) // reseed if # of router less than threshold Reseed (); m_IsRunning = true;