select ipv6 random introducer

This commit is contained in:
orignal 2021-04-21 08:16:13 -04:00
parent ad019da553
commit 060e30d283
3 changed files with 6 additions and 6 deletions

View file

@ -1168,12 +1168,12 @@ namespace data
});
}
std::shared_ptr<const RouterInfo> NetDb::GetRandomIntroducer () const
std::shared_ptr<const RouterInfo> NetDb::GetRandomIntroducer (bool v4) const
{
return GetRandomRouter (
[](std::shared_ptr<const RouterInfo> router)->bool
[v4](std::shared_ptr<const RouterInfo> router)->bool
{
return router->IsIntroducer (true) && !router->IsHidden () && !router->IsFloodfill (); // floodfills don't send relay tag
return router->IsIntroducer (v4) && !router->IsHidden () && !router->IsFloodfill (); // floodfills don't send relay tag
});
}