mirror of
https://github.com/PurpleI2P/i2pd.git
synced 2025-03-07 06:09:42 +00:00
don't include unconfirmed floodfill to the list if we have enough floodfills already
This commit is contained in:
@@ -290,8 +290,10 @@ namespace data
|
||||
if (inserted)
|
||||
{
|
||||
LogPrint (eLogInfo, "NetDb: RouterInfo added: ", ident.ToBase64());
|
||||
if (r->IsFloodfill () && r->IsEligibleFloodfill ())
|
||||
{
|
||||
if (r->IsFloodfill () && r->IsEligibleFloodfill () &&
|
||||
(m_Floodfills.GetSize () < NETDB_NUM_FLOODFILLS_THRESHOLD ||
|
||||
r->GetProfile ()->IsReal ())) // don't insert floodfill until it's known real if we have enough
|
||||
{
|
||||
std::unique_lock<std::mutex> l(m_FloodfillsMutex);
|
||||
m_Floodfills.Insert (r);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user