extra bandwidth caps

This commit is contained in:
orignal 2016-01-02 22:17:04 -05:00
parent 45e7111dda
commit 7149b509d7
7 changed files with 44 additions and 16 deletions

View file

@ -200,8 +200,9 @@ namespace transport
bool Transports::IsBandwidthExceeded () const
{
if (i2p::context.GetRouterInfo ().IsHighBandwidth ()) return false;
return std::max (m_InBandwidth, m_OutBandwidth) > LOW_BANDWIDTH_LIMIT;
if (i2p::context.GetRouterInfo ().IsExtraBandwidth ()) return false;
auto bw = std::max (m_InBandwidth, m_OutBandwidth);
return bw > (i2p::context.GetRouterInfo ().IsHighBandwidth () ? HIGH_BANDWIDTH_LIMIT : LOW_BANDWIDTH_LIMIT);
}
void Transports::SendMessage (const i2p::data::IdentHash& ident, std::shared_ptr<i2p::I2NPMessage> msg)