net: remove SetMaxOutboundTimeframe
This was introduced in 872fee3fcc and it's unclear
if it's ever been used.
This commit is contained in:
3 files changed
+3
-21
No files matched your search
-12
@@ -2885,18 +2885,6 @@ uint64_t CConnman::GetMaxOutboundTimeLeftInCycle()
|
|||||||
return (cycleEndTime < now) ? 0 : cycleEndTime - GetTime();
|
return (cycleEndTime < now) ? 0 : cycleEndTime - GetTime();
|
||||||
}
|
}
|
||||||
|
|
||||||
void CConnman::SetMaxOutboundTimeframe(uint64_t timeframe)
|
|
||||||
{
|
|
||||||
LOCK(cs_totalBytesSent);
|
|
||||||
if (nMaxOutboundTimeframe != timeframe)
|
|
||||||
{
|
|
||||||
// reset measure-cycle in case of changing
|
|
||||||
// the timeframe
|
|
||||||
nMaxOutboundCycleStartTime = GetTime();
|
|
||||||
}
|
|
||||||
nMaxOutboundTimeframe = timeframe;
|
|
||||||
}
|
|
||||||
|
|
||||||
bool CConnman::OutboundTargetReached(bool historicalBlockServingLimit)
|
bool CConnman::OutboundTargetReached(bool historicalBlockServingLimit)
|
||||||
{
|
{
|
||||||
LOCK(cs_totalBytesSent);
|
LOCK(cs_totalBytesSent);
|
||||||
|
|||||||
@@ -367,9 +367,6 @@ public:
|
|||||||
ServiceFlags GetLocalServices() const;
|
ServiceFlags GetLocalServices() const;
|
||||||
|
|
||||||
uint64_t GetMaxOutboundTarget();
|
uint64_t GetMaxOutboundTarget();
|
||||||
|
|
||||||
//!set the timeframe for the max outbound target
|
|
||||||
void SetMaxOutboundTimeframe(uint64_t timeframe);
|
|
||||||
uint64_t GetMaxOutboundTimeframe();
|
uint64_t GetMaxOutboundTimeframe();
|
||||||
|
|
||||||
//! check if the outbound target is reached
|
//! check if the outbound target is reached
|
||||||
|
|||||||
@@ -31,7 +31,7 @@ void test_one_input(const std::vector<uint8_t>& buffer)
|
|||||||
CSubNet random_subnet;
|
CSubNet random_subnet;
|
||||||
std::string random_string;
|
std::string random_string;
|
||||||
while (fuzzed_data_provider.ConsumeBool()) {
|
while (fuzzed_data_provider.ConsumeBool()) {
|
||||||
switch (fuzzed_data_provider.ConsumeIntegralInRange<int>(0, 29)) {
|
switch (fuzzed_data_provider.ConsumeIntegralInRange<int>(0, 28)) {
|
||||||
case 0:
|
case 0:
|
||||||
random_address = ConsumeAddress(fuzzed_data_provider);
|
random_address = ConsumeAddress(fuzzed_data_provider);
|
||||||
break;
|
break;
|
||||||
@@ -127,15 +127,12 @@ void test_one_input(const std::vector<uint8_t>& buffer)
|
|||||||
connman.SetBestHeight(fuzzed_data_provider.ConsumeIntegral<int>());
|
connman.SetBestHeight(fuzzed_data_provider.ConsumeIntegral<int>());
|
||||||
break;
|
break;
|
||||||
case 26:
|
case 26:
|
||||||
connman.SetMaxOutboundTimeframe(fuzzed_data_provider.ConsumeIntegral<uint64_t>());
|
|
||||||
break;
|
|
||||||
case 27:
|
|
||||||
connman.SetNetworkActive(fuzzed_data_provider.ConsumeBool());
|
connman.SetNetworkActive(fuzzed_data_provider.ConsumeBool());
|
||||||
break;
|
break;
|
||||||
case 28:
|
case 27:
|
||||||
connman.SetServices(random_service, static_cast<ServiceFlags>(fuzzed_data_provider.ConsumeIntegral<uint64_t>()));
|
connman.SetServices(random_service, static_cast<ServiceFlags>(fuzzed_data_provider.ConsumeIntegral<uint64_t>()));
|
||||||
break;
|
break;
|
||||||
case 29:
|
case 28:
|
||||||
connman.SetTryNewOutboundPeer(fuzzed_data_provider.ConsumeBool());
|
connman.SetTryNewOutboundPeer(fuzzed_data_provider.ConsumeBool());
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in new issue
Block a user