aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/blockchain_db/lmdb/db_lmdb.cpp13
-rw-r--r--src/blockchain_db/lmdb/db_lmdb.h2
2 files changed, 7 insertions, 8 deletions
diff --git a/src/blockchain_db/lmdb/db_lmdb.cpp b/src/blockchain_db/lmdb/db_lmdb.cpp
index 125eff88f..30d5fae71 100644
--- a/src/blockchain_db/lmdb/db_lmdb.cpp
+++ b/src/blockchain_db/lmdb/db_lmdb.cpp
@@ -456,6 +456,12 @@ inline int lmdb_txn_renew(MDB_txn *txn)
return res;
}
+inline void BlockchainLMDB::check_open() const
+{
+ if (!m_open)
+ throw0(DB_ERROR("DB operation attempted on a not-open DB instance"));
+}
+
void BlockchainLMDB::do_resize(uint64_t increase_size)
{
LOG_PRINT_L3("BlockchainLMDB::" << __func__);
@@ -1112,13 +1118,6 @@ void BlockchainLMDB::remove_spent_key(const crypto::key_image& k_image)
}
}
-void BlockchainLMDB::check_open() const
-{
-// LOG_PRINT_L3("BlockchainLMDB::" << __func__);
- if (!m_open)
- throw0(DB_ERROR("DB operation attempted on a not-open DB instance"));
-}
-
BlockchainLMDB::~BlockchainLMDB()
{
LOG_PRINT_L3("BlockchainLMDB::" << __func__);
diff --git a/src/blockchain_db/lmdb/db_lmdb.h b/src/blockchain_db/lmdb/db_lmdb.h
index 12261dca3..9dad5fd01 100644
--- a/src/blockchain_db/lmdb/db_lmdb.h
+++ b/src/blockchain_db/lmdb/db_lmdb.h
@@ -357,7 +357,7 @@ private:
virtual void check_hard_fork_info();
virtual void drop_hard_fork_info();
- void check_open() const;
+ inline void check_open() const;
virtual bool is_read_only() const;