mirror of
https://github.com/PurpleI2P/i2pd.git
synced 2025-04-28 11:47:48 +02:00
don't include unconfirmed floodfill to the list if we have enough floodfills already
This commit is contained in:
parent
2f74e670a5
commit
b6de474fda
6 changed files with 21 additions and 4 deletions
|
@ -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);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue