aboutsummaryrefslogtreecommitdiff
path: root/src/cryptonote_protocol/block_queue.cpp
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/cryptonote_protocol/block_queue.cpp10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/cryptonote_protocol/block_queue.cpp b/src/cryptonote_protocol/block_queue.cpp
index 4f760582b..94d31404e 100644
--- a/src/cryptonote_protocol/block_queue.cpp
+++ b/src/cryptonote_protocol/block_queue.cpp
@@ -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);