mirror of
https://github.com/monero-project/monero.git
synced 2025-12-22 15:16:40 -08: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:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user