aboutsummaryrefslogtreecommitdiff
path: root/src/cryptonote_core
diff options
context:
space:
mode:
authorZachary Michaels <mikezackles@gmail.com>2014-09-08 17:30:50 -0400
committerRiccardo Spagni <ric@spagni.net>2014-09-15 15:54:19 +0200
commit018e251cc089746437afb9dc88978a8a88fe64a2 (patch)
tree044b035494323a7f7929af547b0b681eb2688724 /src/cryptonote_core
parentAdd descriptions for RPC command line params (diff)
downloadmonero-018e251cc089746437afb9dc88978a8a88fe64a2.tar.xz
Separate testnet default data dir
Diffstat (limited to 'src/cryptonote_core')
-rw-r--r--src/cryptonote_core/cryptonote_core.cpp7
-rw-r--r--src/cryptonote_core/cryptonote_core.h2
2 files changed, 5 insertions, 4 deletions
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");
diff --git a/src/cryptonote_core/cryptonote_core.h b/src/cryptonote_core/cryptonote_core.h
index f050431ef..ba2aed015 100644
--- a/src/cryptonote_core/cryptonote_core.h
+++ b/src/cryptonote_core/cryptonote_core.h
@@ -136,7 +136,7 @@ namespace cryptonote
bool check_tx_ring_signature(const txin_to_key& tx, const crypto::hash& tx_prefix_hash, const std::vector<crypto::signature>& sig);
bool is_tx_spendtime_unlocked(uint64_t unlock_time);
bool update_miner_block_template();
- bool handle_command_line(const boost::program_options::variables_map& vm);
+ bool handle_command_line(const boost::program_options::variables_map& vm, bool testnet);
bool on_update_blocktemplate_interval();
bool check_tx_inputs_keyimages_diff(const transaction& tx);