diff options
author | stoffu <stoffu@protonmail.ch> | 2018-02-16 20:04:04 +0900 |
---|---|---|
committer | stoffu <stoffu@protonmail.ch> | 2018-03-05 11:55:05 +0900 |
commit | af773211cbc620a1be54f517bd60e587d58a7e93 (patch) | |
tree | 40e747cbfc21c7182db27291fb29f9b033de2379 /src/blockchain_utilities/blockchain_export.cpp | |
parent | command_line: allow args to depend on more than one args (diff) | |
download | monero-af773211cbc620a1be54f517bd60e587d58a7e93.tar.xz |
Stagenet
Diffstat (limited to 'src/blockchain_utilities/blockchain_export.cpp')
-rw-r--r-- | src/blockchain_utilities/blockchain_export.cpp | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/src/blockchain_utilities/blockchain_export.cpp b/src/blockchain_utilities/blockchain_export.cpp index b3e11605d..5a49f3478 100644 --- a/src/blockchain_utilities/blockchain_export.cpp +++ b/src/blockchain_utilities/blockchain_export.cpp @@ -58,7 +58,6 @@ int main(int argc, char* argv[]) tools::on_startup(); - boost::filesystem::path default_data_path {tools::get_default_data_dir()}; boost::filesystem::path output_file_path; po::options_description desc_cmd_only("Command line options"); @@ -75,6 +74,7 @@ int main(int argc, char* argv[]) command_line::add_arg(desc_cmd_sett, cryptonote::arg_data_dir); command_line::add_arg(desc_cmd_sett, arg_output_file); command_line::add_arg(desc_cmd_sett, cryptonote::arg_testnet_on); + command_line::add_arg(desc_cmd_sett, cryptonote::arg_stagenet_on); command_line::add_arg(desc_cmd_sett, arg_log_level); command_line::add_arg(desc_cmd_sett, arg_database); command_line::add_arg(desc_cmd_sett, arg_block_stop); @@ -112,6 +112,12 @@ int main(int argc, char* argv[]) LOG_PRINT_L0("Starting..."); bool opt_testnet = command_line::get_arg(vm, cryptonote::arg_testnet_on); + bool opt_stagenet = command_line::get_arg(vm, cryptonote::arg_stagenet_on); + if (opt_testnet && opt_stagenet) + { + std::cerr << "Can't specify more than one of --testnet and --stagenet" << std::endl; + return 1; + } bool opt_blocks_dat = command_line::get_arg(vm, arg_blocks_dat); std::string m_config_folder; @@ -169,7 +175,7 @@ int main(int argc, char* argv[]) LOG_PRINT_L0("Error opening database: " << e.what()); return 1; } - r = core_storage->init(db, opt_testnet); + r = core_storage->init(db, opt_testnet ? cryptonote::TESTNET : opt_stagenet ? cryptonote::STAGENET : cryptonote::MAINNET); CHECK_AND_ASSERT_MES(r, 1, "Failed to initialize source blockchain storage"); LOG_PRINT_L0("Source blockchain storage initialized OK"); |