aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorwarptangent <warptangent@inbox.com>2015-02-11 15:55:53 -0800
committerwarptangent <warptangent@inbox.com>2015-03-16 00:26:58 -0700
commitcb862cb81a664f8c98ed27ba281b8969cbe48e39 (patch)
tree93ca5553f729e242e653294622fd5d97ecea0222
parentAdd blockchain_import utility (diff)
downloadmonero-cb862cb81a664f8c98ed27ba281b8969cbe48e39.tar.xz
Add mdb_flags variable to LMDB database open
-rw-r--r--src/blockchain_db/lmdb/db_lmdb.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/blockchain_db/lmdb/db_lmdb.cpp b/src/blockchain_db/lmdb/db_lmdb.cpp
index 495f93bdc..6d815c997 100644
--- a/src/blockchain_db/lmdb/db_lmdb.cpp
+++ b/src/blockchain_db/lmdb/db_lmdb.cpp
@@ -637,6 +637,7 @@ BlockchainLMDB::BlockchainLMDB(bool batch_transactions)
void BlockchainLMDB::open(const std::string& filename)
{
+ int mdb_flags = 0;
LOG_PRINT_L3("BlockchainLMDB::" << __func__);
if (m_open)
@@ -675,7 +676,7 @@ void BlockchainLMDB::open(const std::string& filename)
size_t mapsize = 1LL << 34;
if (auto result = mdb_env_set_mapsize(m_env, mapsize))
throw0(DB_ERROR(std::string("Failed to set max memory map size: ").append(mdb_strerror(result)).c_str()));
- if (auto result = mdb_env_open(m_env, filename.c_str(), 0, 0644))
+ if (auto result = mdb_env_open(m_env, filename.c_str(), mdb_flags, 0644))
throw0(DB_ERROR(std::string("Failed to open lmdb environment: ").append(mdb_strerror(result)).c_str()));
// get a read/write MDB_txn