From 018e251cc089746437afb9dc88978a8a88fe64a2 Mon Sep 17 00:00:00 2001 From: Zachary Michaels Date: Mon, 8 Sep 2014 17:30:50 -0400 Subject: Separate testnet default data dir --- src/cryptonote_core/cryptonote_core.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'src/cryptonote_core/cryptonote_core.cpp') diff --git a/src/cryptonote_core/cryptonote_core.cpp b/src/cryptonote_core/cryptonote_core.cpp index 3ff139c95..72e5ee209 100644 --- a/src/cryptonote_core/cryptonote_core.cpp +++ b/src/cryptonote_core/cryptonote_core.cpp @@ -75,9 +75,10 @@ namespace cryptonote { } //----------------------------------------------------------------------------------------------- - bool core::handle_command_line(const boost::program_options::variables_map& vm) + bool core::handle_command_line(const boost::program_options::variables_map& vm, bool testnet) { - m_config_folder = command_line::get_arg(vm, command_line::arg_data_dir); + auto data_dir_arg = testnet ? command_line::arg_testnet_data_dir : command_line::arg_data_dir; + m_config_folder = command_line::get_arg(vm, data_dir_arg); return true; } //----------------------------------------------------------------------------------------------- @@ -118,7 +119,7 @@ namespace cryptonote //----------------------------------------------------------------------------------------------- bool core::init(const boost::program_options::variables_map& vm, bool testnet) { - bool r = handle_command_line(vm); + bool r = handle_command_line(vm, testnet); r = m_mempool.init(m_config_folder); CHECK_AND_ASSERT_MES(r, false, "Failed to initialize memory pool"); -- cgit v1.2.3