mirror of
https://github.com/PurpleI2P/i2pd.git
synced 2025-04-28 11:47:48 +02:00
check minimal router version for connected peer selection
This commit is contained in:
parent
32ab95478e
commit
0df895b6a7
2 changed files with 15 additions and 13 deletions
|
@ -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 ():
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue