mirror of
https://git.wownero.com/wownero/wownero.git
synced 2024-08-15 01:03:23 +00:00
blockchain_import: Add database type argument
Default to LMDB.
This commit is contained in:
parent
0fedce00d5
commit
19c1aaa9f6
2 changed files with 4 additions and 4 deletions
|
@ -724,7 +724,7 @@ int main(int argc, char* argv[])
|
||||||
#if !defined(BLOCKCHAIN_DB)
|
#if !defined(BLOCKCHAIN_DB)
|
||||||
if (db_type == "lmdb")
|
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);
|
import_from_file(simple_core, import_file_path, block_stop);
|
||||||
}
|
}
|
||||||
else if (db_type == "memory")
|
else if (db_type == "memory")
|
||||||
|
@ -746,7 +746,7 @@ int main(int argc, char* argv[])
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
#if BLOCKCHAIN_DB == DB_LMDB
|
#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
|
#else
|
||||||
fake_core_memory simple_core(m_config_folder, opt_testnet);
|
fake_core_memory simple_core(m_config_folder, opt_testnet);
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -57,10 +57,10 @@ struct fake_core_db
|
||||||
|
|
||||||
// for multi_db_runtime:
|
// for multi_db_runtime:
|
||||||
#if !defined(BLOCKCHAIN_DB)
|
#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:
|
// for multi_db_compile:
|
||||||
#else
|
#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
|
#endif
|
||||||
{
|
{
|
||||||
m_pool.init(path.string());
|
m_pool.init(path.string());
|
||||||
|
|
Loading…
Reference in a new issue