From 19c1aaa9f69ad4efb58c06e1f383200089296968 Mon Sep 17 00:00:00 2001 From: warptangent Date: Sun, 14 Feb 2016 11:35:30 -0800 Subject: [PATCH] blockchain_import: Add database type argument Default to LMDB. --- src/blockchain_utilities/blockchain_import.cpp | 4 ++-- src/blockchain_utilities/fake_core.h | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/blockchain_utilities/blockchain_import.cpp b/src/blockchain_utilities/blockchain_import.cpp index fa41a3e5..b76eb186 100644 --- a/src/blockchain_utilities/blockchain_import.cpp +++ b/src/blockchain_utilities/blockchain_import.cpp @@ -724,7 +724,7 @@ int main(int argc, char* argv[]) #if !defined(BLOCKCHAIN_DB) if (db_type == "lmdb") { - fake_core_db simple_core(m_config_folder, opt_testnet, opt_batch, db_flags); + fake_core_db simple_core(m_config_folder, opt_testnet, opt_batch, db_type, db_flags); import_from_file(simple_core, import_file_path, block_stop); } else if (db_type == "memory") @@ -746,7 +746,7 @@ int main(int argc, char* argv[]) return 1; } #if BLOCKCHAIN_DB == DB_LMDB - fake_core_db simple_core(m_config_folder, opt_testnet, opt_batch, db_flags); + fake_core_db simple_core(m_config_folder, opt_testnet, opt_batch, db_type, db_flags); #else fake_core_memory simple_core(m_config_folder, opt_testnet); #endif diff --git a/src/blockchain_utilities/fake_core.h b/src/blockchain_utilities/fake_core.h index 8ca332a4..cf2585f2 100644 --- a/src/blockchain_utilities/fake_core.h +++ b/src/blockchain_utilities/fake_core.h @@ -57,10 +57,10 @@ struct fake_core_db // for multi_db_runtime: #if !defined(BLOCKCHAIN_DB) - fake_core_db(const boost::filesystem::path &path, const bool use_testnet=false, const bool do_batch=true, const int db_flags=0) : m_pool(&m_storage), m_storage(m_pool) + fake_core_db(const boost::filesystem::path &path, const bool use_testnet=false, const bool do_batch=true, const std::string& db_type="lmdb", const int db_flags=0) : m_pool(&m_storage), m_storage(m_pool) // for multi_db_compile: #else - fake_core_db(const boost::filesystem::path &path, const bool use_testnet=false, const bool do_batch=true, const int db_flags=0) : m_pool(m_storage), m_storage(m_pool) + fake_core_db(const boost::filesystem::path &path, const bool use_testnet=false, const bool do_batch=true, const std::string& db_type="lmdb", const int db_flags=0) : m_pool(m_storage), m_storage(m_pool) #endif { m_pool.init(path.string());