aboutsummaryrefslogtreecommitdiff
path: root/src/blockchain_db/lmdb/db_lmdb.h
diff options
context:
space:
mode:
authorRiccardo Spagni <ric@spagni.net>2016-03-16 14:46:17 +0200
committerRiccardo Spagni <ric@spagni.net>2016-03-16 14:46:17 +0200
commit33bdba5cdd377d8129a6951d6efdd9271c79b346 (patch)
tree6086237f090ba18c446dfa2608b7bc954b57acfa /src/blockchain_db/lmdb/db_lmdb.h
parentMerge pull request #727 (diff)
parentAdd destructor for readtxns (diff)
downloadmonero-33bdba5cdd377d8129a6951d6efdd9271c79b346.tar.xz
Merge pull request #729
a74348e Add destructor for readtxns (Howard Chu)
Diffstat (limited to 'src/blockchain_db/lmdb/db_lmdb.h')
-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.