aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorfanquake <fanquake@gmail.com>2020-10-24 16:24:07 +0800
committerfanquake <fanquake@gmail.com>2020-12-13 10:38:24 +0800
commit2f3f1aec1f8aadd4a6fb08ca5da7eeda31eb388f (patch)
tree7e38a6f0e52b8a325cdafbc1aec91589bf60fbb5 /src
parentade38b6ee8f91e441507c0ee7ffe6ca020748991 (diff)
net: remove SetMaxOutboundTarget
This has been unused since f3552da81393a8e78ce3e2afed0b9c9d1ff5cee0.
Diffstat (limited to 'src')
-rw-r--r--src/net.cpp6
-rw-r--r--src/net.h2
-rw-r--r--src/test/fuzz/connman.cpp11
3 files changed, 4 insertions, 15 deletions
diff --git a/src/net.cpp b/src/net.cpp
index 7cb91f1388..519717e46c 100644
--- a/src/net.cpp
+++ b/src/net.cpp
@@ -2859,12 +2859,6 @@ void CConnman::RecordBytesSent(uint64_t bytes)
nMaxOutboundTotalBytesSentInCycle += bytes;
}
-void CConnman::SetMaxOutboundTarget(uint64_t limit)
-{
- LOCK(cs_totalBytesSent);
- nMaxOutboundLimit = limit;
-}
-
uint64_t CConnman::GetMaxOutboundTarget()
{
LOCK(cs_totalBytesSent);
diff --git a/src/net.h b/src/net.h
index 41f7fa93ff..dc841d1b11 100644
--- a/src/net.h
+++ b/src/net.h
@@ -366,8 +366,6 @@ public:
//! that peer during `net_processing.cpp:PushNodeVersion()`.
ServiceFlags GetLocalServices() const;
- //!set the max outbound target in bytes
- void SetMaxOutboundTarget(uint64_t limit);
uint64_t GetMaxOutboundTarget();
//!set the timeframe for the max outbound target
diff --git a/src/test/fuzz/connman.cpp b/src/test/fuzz/connman.cpp
index bb97f58cf2..4afaf9def0 100644
--- a/src/test/fuzz/connman.cpp
+++ b/src/test/fuzz/connman.cpp
@@ -31,7 +31,7 @@ void test_one_input(const std::vector<uint8_t>& buffer)
CSubNet random_subnet;
std::string random_string;
while (fuzzed_data_provider.ConsumeBool()) {
- switch (fuzzed_data_provider.ConsumeIntegralInRange<int>(0, 30)) {
+ switch (fuzzed_data_provider.ConsumeIntegralInRange<int>(0, 29)) {
case 0:
random_address = ConsumeAddress(fuzzed_data_provider);
break;
@@ -127,18 +127,15 @@ void test_one_input(const std::vector<uint8_t>& buffer)
connman.SetBestHeight(fuzzed_data_provider.ConsumeIntegral<int>());
break;
case 26:
- connman.SetMaxOutboundTarget(fuzzed_data_provider.ConsumeIntegral<uint64_t>());
- break;
- case 27:
connman.SetMaxOutboundTimeframe(fuzzed_data_provider.ConsumeIntegral<uint64_t>());
break;
- case 28:
+ case 27:
connman.SetNetworkActive(fuzzed_data_provider.ConsumeBool());
break;
- case 29:
+ case 28:
connman.SetServices(random_service, static_cast<ServiceFlags>(fuzzed_data_provider.ConsumeIntegral<uint64_t>()));
break;
- case 30:
+ case 29:
connman.SetTryNewOutboundPeer(fuzzed_data_provider.ConsumeBool());
break;
}