protocol: change standby mode to not wait sleeping

This commit is contained in:
moneromooo-monero
2018-12-07 12:32:50 +00:00
parent 85807dfb25
commit 5464725a29
2 changed files with 24 additions and 12 deletions

View File

@@ -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();