aboutsummaryrefslogtreecommitdiff
path: root/src/p2p/network_throttle-detail.hpp
diff options
context:
space:
mode:
authorrbrunner7 <rbrunner@dreamshare.ch>2017-11-26 15:26:17 +0100
committerrbrunner7 <rbrunner@dreamshare.ch>2017-11-28 21:18:01 +0100
commitcf5f62361682877a08b246a0d04827c5c4cc30f5 (patch)
treec7feb58c06bf0f3ed0396baa93ea0e95c032887b /src/p2p/network_throttle-detail.hpp
parentMerge pull request #2827 (diff)
downloadmonero-cf5f62361682877a08b246a0d04827c5c4cc30f5.tar.xz
Corrections in rate limiting / trottle code, especially in 'out' direction
Deleted 3 out of 4 calls to method connection_basic::sleep_before_packet that were erroneous / superfluous, which enabled the elimination of a "fudge" factor of 2.1 in connection_basic::set_rate_up_limit; also ended the multiplying of limit values and numbers of bytes transferred by 1024 before handing them over to the global throttle objects
Diffstat (limited to 'src/p2p/network_throttle-detail.hpp')
-rw-r--r--src/p2p/network_throttle-detail.hpp4
1 files changed, 1 insertions, 3 deletions
diff --git a/src/p2p/network_throttle-detail.hpp b/src/p2p/network_throttle-detail.hpp
index 27caa85d3..676d4341a 100644
--- a/src/p2p/network_throttle-detail.hpp
+++ b/src/p2p/network_throttle-detail.hpp
@@ -52,8 +52,7 @@ class network_throttle : public i_network_throttle {
};
- network_speed_kbps m_target_speed;
- network_speed_kbps m_real_target_speed;
+ network_speed_bps m_target_speed;
size_t m_network_add_cost; // estimated add cost of headers
size_t m_network_minimal_segment; // estimated minimal cost of sending 1 byte to round up to
size_t m_network_max_segment; // recommended max size of 1 TCP transmission
@@ -76,7 +75,6 @@ class network_throttle : public i_network_throttle {
virtual ~network_throttle();
virtual void set_name(const std::string &name);
virtual void set_target_speed( network_speed_kbps target );
- virtual void set_real_target_speed( network_speed_kbps real_target ); // only for throttle_out
virtual network_speed_kbps get_target_speed();
// add information about events: