mirror of
https://github.com/monero-project/monero.git
synced 2025-08-16 02:20:27 -04:00
cryptonote_protocol: kick idle synchronizing peers
In case they dropped off downloading for any reason, they'll get sent to download again.
This commit is contained in:
parent
d0a610183a
commit
7b74760756
5 changed files with 44 additions and 0 deletions
|
@ -334,6 +334,16 @@ crypto::hash block_queue::get_last_known_hash(const boost::uuids::uuid &connecti
|
|||
return hash;
|
||||
}
|
||||
|
||||
bool block_queue::has_spans(const boost::uuids::uuid &connection_id) const
|
||||
{
|
||||
for (const auto &span: blocks)
|
||||
{
|
||||
if (span.connection_id == connection_id)
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
float block_queue::get_speed(const boost::uuids::uuid &connection_id) const
|
||||
{
|
||||
boost::unique_lock<boost::recursive_mutex> lock(mutex);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue