Skip to content

Commit 2f3f1ae

Browse files
committed
net: remove SetMaxOutboundTarget
This has been unused since f3552da.
1 parent ade38b6 commit 2f3f1ae

File tree

3 files changed

+4
-15
lines changed

3 files changed

+4
-15
lines changed

src/net.cpp

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2859,12 +2859,6 @@ void CConnman::RecordBytesSent(uint64_t bytes)
28592859
nMaxOutboundTotalBytesSentInCycle += bytes;
28602860
}
28612861

2862-
void CConnman::SetMaxOutboundTarget(uint64_t limit)
2863-
{
2864-
LOCK(cs_totalBytesSent);
2865-
nMaxOutboundLimit = limit;
2866-
}
2867-
28682862
uint64_t CConnman::GetMaxOutboundTarget()
28692863
{
28702864
LOCK(cs_totalBytesSent);

src/net.h

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -366,8 +366,6 @@ class CConnman
366366
//! that peer during `net_processing.cpp:PushNodeVersion()`.
367367
ServiceFlags GetLocalServices() const;
368368

369-
//!set the max outbound target in bytes
370-
void SetMaxOutboundTarget(uint64_t limit);
371369
uint64_t GetMaxOutboundTarget();
372370

373371
//!set the timeframe for the max outbound target

src/test/fuzz/connman.cpp

Lines changed: 4 additions & 7 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, 30)) {
34+
switch (fuzzed_data_provider.ConsumeIntegralInRange<int>(0, 29)) {
3535
case 0:
3636
random_address = ConsumeAddress(fuzzed_data_provider);
3737
break;
@@ -127,18 +127,15 @@ 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.SetMaxOutboundTarget(fuzzed_data_provider.ConsumeIntegral<uint64_t>());
131-
break;
132-
case 27:
133130
connman.SetMaxOutboundTimeframe(fuzzed_data_provider.ConsumeIntegral<uint64_t>());
134131
break;
135-
case 28:
132+
case 27:
136133
connman.SetNetworkActive(fuzzed_data_provider.ConsumeBool());
137134
break;
138-
case 29:
135+
case 28:
139136
connman.SetServices(random_service, static_cast<ServiceFlags>(fuzzed_data_provider.ConsumeIntegral<uint64_t>()));
140137
break;
141-
case 30:
138+
case 29:
142139
connman.SetTryNewOutboundPeer(fuzzed_data_provider.ConsumeBool());
143140
break;
144141
}

0 commit comments

Comments
 (0)