From dc53e9eef22531902b8bbad7d9ec33cefc211e84 Mon Sep 17 00:00:00 2001 From: Howard Chu Date: Sat, 18 Feb 2017 17:27:33 +0000 Subject: Add a few read txns to streamline Slight perf gain, but mainly to reduce spam at loglevel 3 --- src/blockchain_db/lmdb/db_lmdb.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/blockchain_db/lmdb/db_lmdb.h') diff --git a/src/blockchain_db/lmdb/db_lmdb.h b/src/blockchain_db/lmdb/db_lmdb.h index e7faf8cdc..57c2a5e39 100644 --- a/src/blockchain_db/lmdb/db_lmdb.h +++ b/src/blockchain_db/lmdb/db_lmdb.h @@ -372,7 +372,7 @@ private: uint64_t m_num_txs; uint64_t m_num_outputs; mutable uint64_t m_cum_size; // used in batch size estimation - mutable int m_cum_count; + mutable unsigned int m_cum_count; std::string m_folder; mdb_txn_safe* m_write_txn; // may point to either a short-lived txn or a batch txn mdb_txn_safe* m_write_batch_txn; // persist batch txn outside of BlockchainLMDB -- cgit v1.2.3 From bf1348b7e2b2c72a6d40b23567afaa46b53e6cb7 Mon Sep 17 00:00:00 2001 From: Howard Chu Date: Sat, 18 Feb 2017 18:46:26 +0000 Subject: Can't cache num_txs or num_outputs either Same reason as 3ff54bdd7a8b5e08e4e8ac17b7fff23ad3a82312 --- src/blockchain_db/lmdb/db_lmdb.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'src/blockchain_db/lmdb/db_lmdb.h') diff --git a/src/blockchain_db/lmdb/db_lmdb.h b/src/blockchain_db/lmdb/db_lmdb.h index 57c2a5e39..b4e3c7174 100644 --- a/src/blockchain_db/lmdb/db_lmdb.h +++ b/src/blockchain_db/lmdb/db_lmdb.h @@ -312,6 +312,9 @@ private: virtual void remove_spent_key(const crypto::key_image& k_image); + uint64_t num_txs() const; + uint64_t num_outputs() const; + // Hard fork virtual void set_hard_fork_version(uint64_t height, uint8_t version); virtual uint8_t get_hard_fork_version(uint64_t height) const; @@ -369,8 +372,6 @@ private: MDB_dbi m_properties; - uint64_t m_num_txs; - uint64_t m_num_outputs; mutable uint64_t m_cum_size; // used in batch size estimation mutable unsigned int m_cum_count; std::string m_folder; -- cgit v1.2.3