diff options
author | Howard Chu <hyc@symas.com> | 2016-03-16 10:24:48 +0000 |
---|---|---|
committer | Howard Chu <hyc@symas.com> | 2016-03-16 11:34:13 +0000 |
commit | a74348e1155e6c18b0748795848f56669011cd9b (patch) | |
tree | 6086237f090ba18c446dfa2608b7bc954b57acfa /src/blockchain_db/lmdb/db_lmdb.h | |
parent | Merge pull request #727 (diff) | |
download | monero-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.h | 4 |
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. |