diff options
author | Riccardo Spagni <ric@spagni.net> | 2017-03-19 23:02:32 +0200 |
---|---|---|
committer | Riccardo Spagni <ric@spagni.net> | 2017-03-19 23:02:32 +0200 |
commit | dbfbd3b69886ee3fb1d338a274c4903094d833c5 (patch) | |
tree | d9c3ab764c013df584938593671e6e0ed37c82d1 | |
parent | Merge pull request #1893 (diff) | |
parent | Partial fix #1876, check thread in block_txn_start() (diff) | |
download | monero-dbfbd3b69886ee3fb1d338a274c4903094d833c5.tar.xz |
Merge pull request #1895
d3aaf740 Partial fix #1876, check thread in block_txn_start() (Howard Chu)
-rw-r--r-- | src/blockchain_db/lmdb/db_lmdb.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/blockchain_db/lmdb/db_lmdb.cpp b/src/blockchain_db/lmdb/db_lmdb.cpp index c7266f19e..dab09e8f4 100644 --- a/src/blockchain_db/lmdb/db_lmdb.cpp +++ b/src/blockchain_db/lmdb/db_lmdb.cpp @@ -2503,7 +2503,8 @@ void BlockchainLMDB::block_txn_start(bool readonly) throw0(DB_ERROR_TXN_START(lmdb_error("Failed to create a transaction for the db: ", mdb_res).c_str())); } memset(&m_wcursors, 0, sizeof(m_wcursors)); - } + } else if (m_writer != boost::this_thread::get_id()) + throw0(DB_ERROR_TXN_START((std::string("Attempted to start new write txn when batch txn already exists in ")+__FUNCTION__).c_str())); } void BlockchainLMDB::block_txn_stop() |