diff options
| author | whythat <whythat@protonmail.com> | 2018-01-21 17:29:55 +0200 |
|---|---|---|
| committer | whythat <whythat@protonmail.com> | 2018-02-16 22:32:01 +0200 |
| commit | 05a12ccc2dc920f4a997e66e6965ae60c1a4c65e (patch) | |
| tree | a694dfd20154294b7a12b9c0b99863c2049b86b6 /src/cryptonote_core/cryptonote_core.cpp | |
| parent | c33cb60eb6e89b6af30fa9d576457ccefff74ad6 (diff) | |
| download | monzero-core-05a12ccc2dc920f4a997e66e6965ae60c1a4c65e.tar.gz monzero-core-05a12ccc2dc920f4a997e66e6965ae60c1a4c65e.tar.xz monzero-core-05a12ccc2dc920f4a997e66e6965ae60c1a4c65e.zip | |
options: remove testnet-* options
Diffstat (limited to 'src/cryptonote_core/cryptonote_core.cpp')
| -rw-r--r-- | src/cryptonote_core/cryptonote_core.cpp | 21 |
1 files changed, 9 insertions, 12 deletions
diff --git a/src/cryptonote_core/cryptonote_core.cpp b/src/cryptonote_core/cryptonote_core.cpp index aaa5ccdbc..f5434fef4 100644 --- a/src/cryptonote_core/cryptonote_core.cpp +++ b/src/cryptonote_core/cryptonote_core.cpp @@ -66,19 +66,18 @@ DISABLE_VS_WARNINGS(4355) namespace cryptonote { - const command_line::arg_descriptor<std::string> arg_data_dir = { - "data-dir" - , "Specify data directory" - }; - const command_line::arg_descriptor<std::string> arg_testnet_data_dir = { - "testnet-data-dir" - , "Specify testnet data directory" - }; const command_line::arg_descriptor<bool, false> arg_testnet_on = { "testnet" , "Run on testnet. The wallet must be launched with --testnet flag." , false }; + 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() + }; const command_line::arg_descriptor<bool> arg_offline = { "offline" , "Do not listen for peers, nor connect to any" @@ -229,8 +228,7 @@ namespace cryptonote //----------------------------------------------------------------------------------- void core::init_options(boost::program_options::options_description& desc) { - command_line::add_arg(desc, arg_data_dir, tools::get_default_data_dir()); - command_line::add_arg(desc, arg_testnet_data_dir, (boost::filesystem::path(tools::get_default_data_dir()) / "testnet").string()); + command_line::add_arg(desc, arg_data_dir); command_line::add_arg(desc, arg_test_drop_download); command_line::add_arg(desc, arg_test_drop_download_height); @@ -256,8 +254,7 @@ namespace cryptonote { m_testnet = command_line::get_arg(vm, arg_testnet_on); - auto data_dir_arg = m_testnet ? arg_testnet_data_dir : arg_data_dir; - m_config_folder = command_line::get_arg(vm, data_dir_arg); + m_config_folder = command_line::get_arg(vm, arg_data_dir); auto data_dir = boost::filesystem::path(m_config_folder); |
