mirror of
https://git.wownero.com/wownero/wownero.git
synced 2024-08-15 01:03:23 +00:00
Partial fix #1876, check thread in block_txn_start()
Don't allow use of existing batch txn if it's from the wrong thread
This commit is contained in:
parent
df140d90ee
commit
d3aaf74080
1 changed files with 2 additions and 1 deletions
|
@ -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()));
|
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));
|
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()
|
void BlockchainLMDB::block_txn_stop()
|
||||||
|
|
Loading…
Reference in a new issue