aboutsummaryrefslogtreecommitdiff
path: root/src/blockchain_db/lmdb/db_lmdb.h
diff options
context:
space:
mode:
authorHoward Chu <hyc@symas.com>2016-03-16 10:24:48 +0000
committerHoward Chu <hyc@symas.com>2016-03-16 11:34:13 +0000
commita74348e1155e6c18b0748795848f56669011cd9b (patch)
tree6086237f090ba18c446dfa2608b7bc954b57acfa /src/blockchain_db/lmdb/db_lmdb.h
parentMerge pull request #727 (diff)
downloadmonero-a74348e1155e6c18b0748795848f56669011cd9b.tar.xz
Add destructor for readtxns
Only if we created the readtxn. Was missing cleanups from exceptions before.
Diffstat (limited to '')
-rw-r--r--src/blockchain_db/lmdb/db_lmdb.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/blockchain_db/lmdb/db_lmdb.h b/src/blockchain_db/lmdb/db_lmdb.h
index 718ee1058..a3f32ffaa 100644
--- a/src/blockchain_db/lmdb/db_lmdb.h
+++ b/src/blockchain_db/lmdb/db_lmdb.h
@@ -115,7 +115,7 @@ typedef struct mdb_threadinfo
struct mdb_txn_safe
{
- mdb_txn_safe();
+ mdb_txn_safe(const bool check=true);
~mdb_txn_safe();
void commit(std::string message = "");
@@ -142,8 +142,10 @@ struct mdb_txn_safe
static void wait_no_active_txns();
static void allow_new_txns();
+ mdb_threadinfo* m_tinfo;
MDB_txn* m_txn;
bool m_batch_txn = false;
+ bool m_check;
static std::atomic<uint64_t> num_active_txns;
// could use a mutex here, but this should be sufficient.