diff options
author | moneromooo-monero <moneromooo-monero@users.noreply.github.com> | 2018-12-05 19:26:49 +0000 |
---|---|---|
committer | moneromooo-monero <moneromooo-monero@users.noreply.github.com> | 2018-12-05 21:13:21 +0000 |
commit | 833269834d7a93d475df3091c362873501d1cb88 (patch) | |
tree | 91f99636774b0d8eecc96a9b980a64da038f0ec3 /src/blockchain_db/lmdb/db_lmdb.cpp | |
parent | blockchain_db: allocate known size vector only once (diff) | |
download | monero-833269834d7a93d475df3091c362873501d1cb88.tar.xz |
db_lmdb: inline check_open, it's trivial and called everywhere
Diffstat (limited to 'src/blockchain_db/lmdb/db_lmdb.cpp')
-rw-r--r-- | src/blockchain_db/lmdb/db_lmdb.cpp | 13 |
1 files changed, 6 insertions, 7 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__); |