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_import.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_import.cpp')
-rw-r--r-- | src/blockchain_utilities/blockchain_import.cpp | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/src/blockchain_utilities/blockchain_import.cpp b/src/blockchain_utilities/blockchain_import.cpp index 6195e47e7..caa549c13 100644 --- a/src/blockchain_utilities/blockchain_import.cpp +++ b/src/blockchain_utilities/blockchain_import.cpp @@ -53,6 +53,7 @@ bool opt_batch = true; bool opt_verify = true; // use add_new_block, which does verification before calling add_block bool opt_resume = true; bool opt_testnet = true; +bool opt_stagenet = true; // number of blocks per batch transaction // adjustable through command-line argument according to available RAM @@ -574,8 +575,6 @@ int main(int argc, char* argv[]) tools::on_startup(); - boost::filesystem::path default_data_path {tools::get_default_data_dir()}; - boost::filesystem::path default_testnet_data_path {default_data_path / "testnet"}; std::string import_file_path; po::options_description desc_cmd_only("Command line options"); @@ -671,6 +670,12 @@ int main(int argc, char* argv[]) } opt_testnet = command_line::get_arg(vm, cryptonote::arg_testnet_on); + opt_stagenet = command_line::get_arg(vm, cryptonote::arg_stagenet_on); + if (opt_testnet && opt_stagenet) + { + std::cerr << "Error: Can't specify more than one of --testnet and --stagenet" << ENDL; + return 1; + } m_config_folder = command_line::get_arg(vm, cryptonote::arg_data_dir); db_arg_str = command_line::get_arg(vm, arg_database); @@ -728,7 +733,7 @@ int main(int argc, char* argv[]) MINFO("batch: " << std::boolalpha << opt_batch << std::noboolalpha); } MINFO("resume: " << std::boolalpha << opt_resume << std::noboolalpha); - MINFO("testnet: " << std::boolalpha << opt_testnet << std::noboolalpha); + MINFO("nettype: " << (opt_testnet ? "testnet" : opt_stagenet ? "stagenet" : "mainnet")); MINFO("bootstrap file path: " << import_file_path); MINFO("database path: " << m_config_folder); |