summaryrefslogtreecommitdiff
path: root/plugins/Dbx_mdbx/src/dbmodulechain.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/Dbx_mdbx/src/dbmodulechain.cpp')
-rw-r--r--plugins/Dbx_mdbx/src/dbmodulechain.cpp6
1 files changed, 3 insertions, 3 deletions
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;
}