diff options
author | moneromooo-monero <moneromooo-monero@users.noreply.github.com> | 2018-05-22 14:46:30 +0100 |
---|---|---|
committer | moneromooo-monero <moneromooo-monero@users.noreply.github.com> | 2018-07-13 11:37:04 +0100 |
commit | 45e419bd5c756337635feccec388efedf04f44ac (patch) | |
tree | 87d196cadada9f73419e353d02120122e90161d2 /src/blockchain_db/lmdb/db_lmdb.h | |
parent | Merge pull request #4094 (diff) | |
download | monero-45e419bd5c756337635feccec388efedf04f44ac.tar.xz |
db: store cumulative rct output distribution in the db for speed
This gets rid of the temporary precalc cache.
Also make the RPC able to send data back in binary or JSON,
since there can be a lot of data
This bumps the LMDB database format to v3, with migration.
Diffstat (limited to 'src/blockchain_db/lmdb/db_lmdb.h')
-rw-r--r-- | src/blockchain_db/lmdb/db_lmdb.h | 6 |
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 cc1b06ca0..b7f6262ae 100644 --- a/src/blockchain_db/lmdb/db_lmdb.h +++ b/src/blockchain_db/lmdb/db_lmdb.h @@ -197,6 +197,8 @@ public: virtual cryptonote::blobdata get_block_blob_from_height(const uint64_t& height) const; + virtual std::vector<uint64_t> get_block_cumulative_rct_outputs(const std::vector<uint64_t> &heights) const; + virtual uint64_t get_block_timestamp(const uint64_t& height) const; virtual uint64_t get_top_block_timestamp() const; @@ -317,6 +319,7 @@ private: , const size_t& block_size , const difficulty_type& cumulative_difficulty , const uint64_t& coins_generated + , uint64_t num_rct_outs , const crypto::hash& block_hash ); @@ -387,6 +390,9 @@ private: // migrate from DB version 1 to 2 void migrate_1_2(); + // migrate from DB version 2 to 3 + void migrate_2_3(); + void cleanup_batch(); private: |