Skip to content

Commit b117eb1

Browse files
committed
net: remove SetMaxOutboundTimeframe
This was introduced in 872fee3 and it's unclear if it's ever been used.
1 parent 2f3f1ae commit b117eb1

File tree

3 files changed

+3
-21
lines changed

3 files changed

+3
-21
lines changed

src/net.cpp

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -2885,18 +2885,6 @@ uint64_t CConnman::GetMaxOutboundTimeLeftInCycle()
28852885
return (cycleEndTime < now) ? 0 : cycleEndTime - GetTime();
28862886
}
28872887

2888-
void CConnman::SetMaxOutboundTimeframe(uint64_t timeframe)
2889-
{
2890-
LOCK(cs_totalBytesSent);
2891-
if (nMaxOutboundTimeframe != timeframe)
2892-
{
2893-
// reset measure-cycle in case of changing
2894-
// the timeframe
2895-
nMaxOutboundCycleStartTime = GetTime();
2896-
}
2897-
nMaxOutboundTimeframe = timeframe;
2898-
}
2899-
29002888
bool CConnman::OutboundTargetReached(bool historicalBlockServingLimit)
29012889
{
29022890
LOCK(cs_totalBytesSent);

src/net.h

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -367,9 +367,6 @@ class CConnman
367367
ServiceFlags GetLocalServices() const;
368368

369369
uint64_t GetMaxOutboundTarget();
370-
371-
//!set the timeframe for the max outbound target
372-
void SetMaxOutboundTimeframe(uint64_t timeframe);
373370
uint64_t GetMaxOutboundTimeframe();
374371

375372
//! check if the outbound target is reached

src/test/fuzz/connman.cpp

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ void test_one_input(const std::vector<uint8_t>& buffer)
3131
CSubNet random_subnet;
3232
std::string random_string;
3333
while (fuzzed_data_provider.ConsumeBool()) {
34-
switch (fuzzed_data_provider.ConsumeIntegralInRange<int>(0, 29)) {
34+
switch (fuzzed_data_provider.ConsumeIntegralInRange<int>(0, 28)) {
3535
case 0:
3636
random_address = ConsumeAddress(fuzzed_data_provider);
3737
break;
@@ -127,15 +127,12 @@ void test_one_input(const std::vector<uint8_t>& buffer)
127127
connman.SetBestHeight(fuzzed_data_provider.ConsumeIntegral<int>());
128128
break;
129129
case 26:
130-
connman.SetMaxOutboundTimeframe(fuzzed_data_provider.ConsumeIntegral<uint64_t>());
131-
break;
132-
case 27:
133130
connman.SetNetworkActive(fuzzed_data_provider.ConsumeBool());
134131
break;
135-
case 28:
132+
case 27:
136133
connman.SetServices(random_service, static_cast<ServiceFlags>(fuzzed_data_provider.ConsumeIntegral<uint64_t>()));
137134
break;
138-
case 29:
135+
case 28:
139136
connman.SetTryNewOutboundPeer(fuzzed_data_provider.ConsumeBool());
140137
break;
141138
}

0 commit comments

Comments
 (0)