From 6a6b08bfbdc3d77874b72ccb4b99cc50c6b8397b Mon Sep 17 00:00:00 2001 From: George Hazan Date: Fri, 23 Mar 2018 16:58:35 +0300 Subject: fixes #1195 (Import from mdbx is broken) --- plugins/Dbx_mdbx/src/dbmodulechain.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'plugins/Dbx_mdbx/src/dbmodulechain.cpp') diff --git a/plugins/Dbx_mdbx/src/dbmodulechain.cpp b/plugins/Dbx_mdbx/src/dbmodulechain.cpp index c133426350..daaaf494ff 100644 --- a/plugins/Dbx_mdbx/src/dbmodulechain.cpp +++ b/plugins/Dbx_mdbx/src/dbmodulechain.cpp @@ -44,10 +44,10 @@ uint32_t CDbxMDBX::GetModuleID(const char *szName) if (m_Modules.find(iHash) == m_Modules.end()) { MDBX_val key = { &iHash, sizeof(iHash) }, data = { (void*)szName, strlen(szName) + 1 }; { - txn_ptr txn(m_env); - if (mdbx_put(txn, m_dbModules, &key, &data, 0) != MDBX_SUCCESS) + txn_ptr trnlck(StartTran()); + if (mdbx_put(trnlck, m_dbModules, &key, &data, 0) != MDBX_SUCCESS) return -1; - if (txn.commit() != MDBX_SUCCESS) + if (trnlck.commit() != MDBX_SUCCESS) return -1; } -- cgit v1.2.3