aboutsummaryrefslogtreecommitdiff
path: root/src/blockchain_db/lmdb/db_lmdb.h
diff options
context:
space:
mode:
authormoneromooo-monero <moneromooo-monero@users.noreply.github.com>2019-02-21 00:13:21 +0000
committermoneromooo-monero <moneromooo-monero@users.noreply.github.com>2019-03-08 12:04:14 +0000
commit4b21d38dfda29fe916700887c99d44edeb8fe06f (patch)
tree5d372ac8bdcff8d8d0ba043fc7dea0a20baad57d /src/blockchain_db/lmdb/db_lmdb.h
parentMerge pull request #5232 (diff)
downloadmonero-4b21d38dfda29fe916700887c99d44edeb8fe06f.tar.xz
blockchain: speed up getting N blocks weights/long term weights
Diffstat (limited to 'src/blockchain_db/lmdb/db_lmdb.h')
-rw-r--r--src/blockchain_db/lmdb/db_lmdb.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/blockchain_db/lmdb/db_lmdb.h b/src/blockchain_db/lmdb/db_lmdb.h
index 82016c17a..fcf87b646 100644
--- a/src/blockchain_db/lmdb/db_lmdb.h
+++ b/src/blockchain_db/lmdb/db_lmdb.h
@@ -219,6 +219,8 @@ public:
virtual size_t get_block_weight(const uint64_t& height) const;
+ virtual std::vector<uint64_t> get_block_weights(uint64_t start_height, size_t count) const;
+
virtual difficulty_type get_block_cumulative_difficulty(const uint64_t& height) const;
virtual difficulty_type get_block_difficulty(const uint64_t& height) const;
@@ -227,6 +229,8 @@ public:
virtual uint64_t get_block_long_term_weight(const uint64_t& height) const;
+ virtual std::vector<uint64_t> get_long_term_block_weights(uint64_t start_height, size_t count) const;
+
virtual crypto::hash get_block_hash_from_height(const uint64_t& height) const;
virtual std::vector<block> get_blocks_range(const uint64_t& h1, const uint64_t& h2) const;
@@ -394,6 +398,8 @@ private:
virtual uint64_t get_database_size() const;
+ std::vector<uint64_t> get_block_info_64bit_fields(uint64_t start_height, size_t count, off_t offset) const;
+
// fix up anything that may be wrong due to past bugs
virtual void fixup();