diff options
author | moneromooo-monero <moneromooo-monero@users.noreply.github.com> | 2018-12-07 12:32:50 +0000 |
---|---|---|
committer | moneromooo-monero <moneromooo-monero@users.noreply.github.com> | 2018-12-07 12:53:11 +0000 |
commit | 5464725a29c7ea8bc917d447bf04ba481f791fe9 (patch) | |
tree | b9e00e911bc0c12a012fd890b9ab7e015162d2cc /src/cryptonote_protocol/cryptonote_protocol_handler.h | |
parent | add a once_a_time_milliseconds class (diff) | |
download | monero-5464725a29c7ea8bc917d447bf04ba481f791fe9.tar.xz |
protocol: change standby mode to not wait sleeping
Diffstat (limited to 'src/cryptonote_protocol/cryptonote_protocol_handler.h')
-rw-r--r-- | src/cryptonote_protocol/cryptonote_protocol_handler.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/cryptonote_protocol/cryptonote_protocol_handler.h b/src/cryptonote_protocol/cryptonote_protocol_handler.h index d7b74c06d..618b635cc 100644 --- a/src/cryptonote_protocol/cryptonote_protocol_handler.h +++ b/src/cryptonote_protocol/cryptonote_protocol_handler.h @@ -131,6 +131,7 @@ namespace cryptonote bool should_download_next_span(cryptonote_connection_context& context) const; void drop_connection(cryptonote_connection_context &context, bool add_fail, bool flush_all_spans); bool kick_idle_peers(); + bool check_standby_peers(); int try_add_next_blocks(cryptonote_connection_context &context); t_core& m_core; @@ -143,6 +144,7 @@ namespace cryptonote boost::mutex m_sync_lock; block_queue m_block_queue; epee::math_helper::once_a_time_seconds<30> m_idle_peer_kicker; + epee::math_helper::once_a_time_milliseconds<100> m_standby_checker; boost::mutex m_buffer_mutex; double get_avg_block_size(); |