mirror of
https://github.com/PurpleI2P/i2pd.git
synced 2025-03-07 06:09:42 +00:00
check minimal router version for connected peer selection
This commit is contained in:
@@ -131,6 +131,17 @@ namespace transport
|
||||
LogPrint(eLogError, "Transports: Return null DHKeys");
|
||||
}
|
||||
|
||||
void Peer::UpdateParams (std::shared_ptr<const i2p::data::RouterInfo> router)
|
||||
{
|
||||
if (router)
|
||||
{
|
||||
isHighBandwidth = router->IsHighBandwidth ();
|
||||
isEligible =(bool)router->GetCompatibleTransports (true) && // reachable
|
||||
router->GetCongestion () != i2p::data::RouterInfo::eRejectAll && // accepts tunnel
|
||||
router->IsECIES () && router->GetVersion () >= NETDB_MIN_HIGHBANDWIDTH_VERSION; // not too old
|
||||
}
|
||||
}
|
||||
|
||||
Transports transports;
|
||||
|
||||
Transports::Transports ():
|
||||
|
||||
Reference in New Issue
Block a user