mirror of
https://github.com/PurpleI2P/i2pd.git
synced 2025-01-22 13:27:17 +01:00
pick first hop based on pool's bandwidth requirements
This commit is contained in:
parent
9f30499984
commit
e4962b855f
|
@ -587,7 +587,7 @@ namespace tunnel
|
||||||
else if (i2p::transport::transports.GetNumPeers () > 100 ||
|
else if (i2p::transport::transports.GetNumPeers () > 100 ||
|
||||||
(inbound && i2p::transport::transports.GetNumPeers () > 25))
|
(inbound && i2p::transport::transports.GetNumPeers () > 25))
|
||||||
{
|
{
|
||||||
auto r = i2p::transport::transports.GetRandomPeer (!IsExploratory ());
|
auto r = i2p::transport::transports.GetRandomPeer (m_IsHighBandwidth);
|
||||||
if (r && r->IsECIES () && !r->GetProfile ()->IsBad () &&
|
if (r && r->IsECIES () && !r->GetProfile ()->IsBad () &&
|
||||||
(numHops > 1 || (r->IsV4 () && (!inbound || r->IsPublished (true))))) // first inbound must be published ipv4
|
(numHops > 1 || (r->IsV4 () && (!inbound || r->IsPublished (true))))) // first inbound must be published ipv4
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in a new issue