mirror of
https://git.wownero.com/wownero/wownero.git
synced 2024-08-15 01:03:23 +00:00
db_lmdb: inline check_open, it's trivial and called everywhere
This commit is contained in:
parent
c3fae517a4
commit
1b0fe29ee3
2 changed files with 7 additions and 8 deletions
|
@ -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__);
|
||||
|
@ -1166,13 +1172,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__);
|
||||
|
|
|
@ -359,7 +359,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;
|
||||
|
||||
|
|
Loading…
Reference in a new issue