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.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/plugins/Dbx_mdbx/src/dbmodulechain.cpp b/plugins/Dbx_mdbx/src/dbmodulechain.cpp
index f67193066c..655937a0bc 100644
--- a/plugins/Dbx_mdbx/src/dbmodulechain.cpp
+++ b/plugins/Dbx_mdbx/src/dbmodulechain.cpp
@@ -48,7 +48,7 @@ uint32_t CDbxMDBX::GetModuleID(const char *szName)
MDBX_val key = { &iHash, sizeof(iHash) }, data = { (void*)szName, strlen(szName) + 1 };
{
txn_ptr trnlck(StartTran());
- if (mdbx_put(trnlck, m_dbModules, &key, &data, 0) != MDBX_SUCCESS)
+ if (mdbx_put(trnlck, m_dbModules, &key, &data, MDBX_UPSERT) != MDBX_SUCCESS)
return -1;
if (trnlck.commit() != MDBX_SUCCESS)
return -1;