diff options
| author | Lee *!* Clagett <code@leeclagett.com> | 2024-10-08 20:27:09 -0400 |
|---|---|---|
| committer | Lee *!* Clagett <code@leeclagett.com> | 2025-02-03 12:04:45 -0500 |
| commit | ed70c162244b7b42119e2011bb5cf90061160629 (patch) | |
| tree | 5efbfb17847c8577f42e96ea06aa449d1e6a008f /src/cryptonote_protocol/block_queue.h | |
| parent | 5e31c0adf2dd381be0da6e8c471cfeccb8ba594b (diff) | |
| download | monzero-core-ed70c162244b7b42119e2011bb5cf90061160629.tar.gz monzero-core-ed70c162244b7b42119e2011bb5cf90061160629.tar.xz monzero-core-ed70c162244b7b42119e2011bb5cf90061160629.zip | |
Some cleanup in span/connection_context + few more checks
Diffstat (limited to 'src/cryptonote_protocol/block_queue.h')
| -rw-r--r-- | src/cryptonote_protocol/block_queue.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/cryptonote_protocol/block_queue.h b/src/cryptonote_protocol/block_queue.h index 64ff106a3..df64948fa 100644 --- a/src/cryptonote_protocol/block_queue.h +++ b/src/cryptonote_protocol/block_queue.h @@ -98,6 +98,7 @@ namespace cryptonote bool foreach(std::function<bool(const span&)> f) const; bool requested(const crypto::hash &hash) const; bool have(const crypto::hash &hash) const; + std::uint64_t have_height(const crypto::hash &hash) const; private: void erase_block(block_map::iterator j); @@ -107,6 +108,6 @@ namespace cryptonote block_map blocks; mutable boost::recursive_mutex mutex; std::unordered_set<crypto::hash> requested_hashes; - std::unordered_set<crypto::hash> have_blocks; + std::unordered_map<crypto::hash, std::uint64_t> have_blocks; }; } |
