aboutsummaryrefslogtreecommitdiff
path: root/src/blockchain_db/lmdb
diff options
context:
space:
mode:
authorwarptangent <warptangent@inbox.com>2015-02-11 16:02:20 -0800
committerwarptangent <warptangent@inbox.com>2015-03-16 00:26:59 -0700
commit275cbd4348975371988c79f67d68ceede3f47a1d (patch)
tree859bf49547cb9aa6ad4b2d3e846c8e8972830e9f /src/blockchain_db/lmdb
parentAdd mdb_flags variable to LMDB database open (diff)
downloadmonero-275cbd4348975371988c79f67d68ceede3f47a1d.tar.xz
Add support for database open with flags
Add support to: - BlockchainDB, BlockchainLMDB - blockchain_import utility to open LMDB database with one or more LMDB flags. Sample use: $ blockchain_import --database lmdb#nosync $ blockchain_import --database lmdb#nosync,nometasync
Diffstat (limited to '')
-rw-r--r--src/blockchain_db/lmdb/db_lmdb.cpp3
-rw-r--r--src/blockchain_db/lmdb/db_lmdb.h2
2 files changed, 2 insertions, 3 deletions
diff --git a/src/blockchain_db/lmdb/db_lmdb.cpp b/src/blockchain_db/lmdb/db_lmdb.cpp
index 6d815c997..b1da6308f 100644
--- a/src/blockchain_db/lmdb/db_lmdb.cpp
+++ b/src/blockchain_db/lmdb/db_lmdb.cpp
@@ -635,9 +635,8 @@ BlockchainLMDB::BlockchainLMDB(bool batch_transactions)
m_height = 0;
}
-void BlockchainLMDB::open(const std::string& filename)
+void BlockchainLMDB::open(const std::string& filename, const int mdb_flags)
{
- int mdb_flags = 0;
LOG_PRINT_L3("BlockchainLMDB::" << __func__);
if (m_open)
diff --git a/src/blockchain_db/lmdb/db_lmdb.h b/src/blockchain_db/lmdb/db_lmdb.h
index 1a684548e..fa7cb988a 100644
--- a/src/blockchain_db/lmdb/db_lmdb.h
+++ b/src/blockchain_db/lmdb/db_lmdb.h
@@ -114,7 +114,7 @@ public:
BlockchainLMDB(bool batch_transactions=false);
~BlockchainLMDB();
- virtual void open(const std::string& filename);
+ virtual void open(const std::string& filename, const int mdb_flags=0);
virtual void create(const std::string& filename);