diff options
author | rbrunner7 <rbrunner@dreamshare.ch> | 2017-11-26 15:26:17 +0100 |
---|---|---|
committer | rbrunner7 <rbrunner@dreamshare.ch> | 2017-11-28 21:18:01 +0100 |
commit | cf5f62361682877a08b246a0d04827c5c4cc30f5 (patch) | |
tree | c7feb58c06bf0f3ed0396baa93ea0e95c032887b /src/cryptonote_protocol | |
parent | Merge pull request #2827 (diff) | |
download | monero-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 '')
-rw-r--r-- | src/cryptonote_protocol/cryptonote_protocol_handler-base.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/cryptonote_protocol/cryptonote_protocol_handler-base.cpp b/src/cryptonote_protocol/cryptonote_protocol_handler-base.cpp index 3bda50c22..094e4fc95 100644 --- a/src/cryptonote_protocol/cryptonote_protocol_handler-base.cpp +++ b/src/cryptonote_protocol/cryptonote_protocol_handler-base.cpp @@ -140,7 +140,7 @@ void cryptonote_protocol_handler_base::handler_response_blocks_now(size_t packet { CRITICAL_REGION_LOCAL( network_throttle_manager::m_lock_get_global_throttle_out ); - delay = network_throttle_manager::get_global_throttle_out().get_sleep_time_after_tick( packet_size ); // decission from global + delay = network_throttle_manager::get_global_throttle_out().get_sleep_time_after_tick( packet_size ); } |