1
0
Fork 0
forked from lthn/blockchain

fixed deadlock on abort_tx

This commit is contained in:
crypro.zoidberg 2019-01-16 18:59:55 +03:00
parent 0ffd3389b4
commit c31b3c801b
2 changed files with 2 additions and 1 deletions

View file

@ -203,7 +203,7 @@ namespace tools
if (txe.count == 0 || (txe.read_only && txe.count == 1))
{
mdb_txn_abort(txe.ptx);
if (!txe.read_only && txe.count)
if (!txe.read_only && !txe.count)
{
CRITICAL_SECTION_UNLOCK(m_write_exclusive_lock);
LOG_PRINT_CYAN("[DB " << m_path << "] WRITE UNLOCKED(ABORTED)", LOG_LEVEL_3);

View file

@ -44,6 +44,7 @@ int main(int argc, char *argv[])
epee::string_tools::set_module_name_and_folder(argv[0]);
QCoreApplication::setAttribute(Qt::AA_EnableHighDpiScaling);
QApplication app(argc, argv);
MainWindow viewer;
if (!viewer.init_backend(argc, argv))