diff options
author | Riccardo Spagni <ric@spagni.net> | 2017-08-17 21:39:44 +0200 |
---|---|---|
committer | Riccardo Spagni <ric@spagni.net> | 2017-08-17 21:39:44 +0200 |
commit | 4466b6d1b08d827f3bdddb1cab8ca05833b65437 (patch) | |
tree | 3e86342c3194fddb5fac2b5f51b33bcf55ec887a /src/cryptonote_protocol/block_queue.cpp | |
parent | Merge pull request #2301 (diff) | |
parent | cryptonote_protocol: large block sync size before v4 (diff) | |
download | monero-4466b6d1b08d827f3bdddb1cab8ca05833b65437.tar.xz |
Merge pull request #2303
5a283078 cryptonote_protocol: large block sync size before v4 (moneromooo-monero)
7b747607 cryptonote_protocol: kick idle synchronizing peers (moneromooo-monero)
Diffstat (limited to 'src/cryptonote_protocol/block_queue.cpp')
-rw-r--r-- | src/cryptonote_protocol/block_queue.cpp | 10 |
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); |