mirror of
https://github.com/PurpleI2P/i2pd.git
synced 2025-01-13 15:27:52 +00:00
select ECIES routers only for peer tests and introducers
This commit is contained in:
parent
3a77e7ba2d
commit
c763472914
@ -1181,8 +1181,8 @@ namespace data
|
|||||||
return GetRandomRouter (
|
return GetRandomRouter (
|
||||||
[v4, &excluded](std::shared_ptr<const RouterInfo> router)->bool
|
[v4, &excluded](std::shared_ptr<const RouterInfo> router)->bool
|
||||||
{
|
{
|
||||||
return !router->IsHidden () && router->IsPeerTesting (v4) &&
|
return !router->IsHidden () && router->IsECIES () &&
|
||||||
!excluded.count (router->GetIdentHash ());
|
router->IsPeerTesting (v4) && !excluded.count (router->GetIdentHash ());
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1191,7 +1191,7 @@ namespace data
|
|||||||
return GetRandomRouter (
|
return GetRandomRouter (
|
||||||
[](std::shared_ptr<const RouterInfo> router)->bool
|
[](std::shared_ptr<const RouterInfo> router)->bool
|
||||||
{
|
{
|
||||||
return !router->IsHidden () && router->IsSSUV6 ();
|
return !router->IsHidden () && router->IsECIES () && router->IsSSUV6 ();
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1200,8 +1200,8 @@ namespace data
|
|||||||
return GetRandomRouter (
|
return GetRandomRouter (
|
||||||
[v4, &excluded](std::shared_ptr<const RouterInfo> router)->bool
|
[v4, &excluded](std::shared_ptr<const RouterInfo> router)->bool
|
||||||
{
|
{
|
||||||
return router->IsIntroducer (v4) && !excluded.count (router->GetIdentHash ()) &&
|
return !router->IsHidden () && router->IsECIES () && !router->IsFloodfill () && // floodfills don't send relay tag
|
||||||
!router->IsHidden () && !router->IsFloodfill (); // floodfills don't send relay tag
|
router->IsIntroducer (v4) && !excluded.count (router->GetIdentHash ());
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user