aboutsummaryrefslogtreecommitdiff
path: root/src/cryptonote_core
diff options
context:
space:
mode:
authorwhythat <whythat@protonmail.com>2018-01-22 03:49:51 +0200
committerwhythat <whythat@protonmail.com>2018-02-16 22:32:01 +0200
commitb3b2d4d20cc3c3cf3206468e66f2590c3aed948a (patch)
tree07973a209c847d78f6f574437bf69b058ddce241 /src/cryptonote_core
parentcommon: implement dynamic option dependencies mechanism (diff)
downloadmonero-b3b2d4d20cc3c3cf3206468e66f2590c3aed948a.tar.xz
options: add testnet option dependencies
Diffstat (limited to 'src/cryptonote_core')
-rw-r--r--src/cryptonote_core/cryptonote_core.cpp8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/cryptonote_core/cryptonote_core.cpp b/src/cryptonote_core/cryptonote_core.cpp
index f5434fef4..64c14f7a2 100644
--- a/src/cryptonote_core/cryptonote_core.cpp
+++ b/src/cryptonote_core/cryptonote_core.cpp
@@ -74,9 +74,13 @@ namespace cryptonote
const command_line::arg_descriptor<std::string, false, true> arg_data_dir = {
"data-dir"
, "Specify data directory"
- , arg_testnet_on
- , (boost::filesystem::path(tools::get_default_data_dir()) / "testnet").string()
, tools::get_default_data_dir()
+ , arg_testnet_on
+ , [](bool testnet, bool defaulted, std::string val) {
+ if (testnet)
+ return (boost::filesystem::path(val) / "testnet").string();
+ return val;
+ }
};
const command_line::arg_descriptor<bool> arg_offline = {
"offline"