diff options
author | Riccardo Spagni <ric@spagni.net> | 2017-10-15 18:38:46 +0200 |
---|---|---|
committer | Riccardo Spagni <ric@spagni.net> | 2017-10-15 18:38:46 +0200 |
commit | 1280ba4f5ba89f74f9394122dc8a91bb12876d00 (patch) | |
tree | 80100180b80b15c5649a3ff5e3985ccbada8a5a7 /src/blockchain_utilities/blockchain_import.cpp | |
parent | Merge pull request #2587 (diff) | |
parent | add a command_line function to check for defaulted options (diff) | |
download | monero-1280ba4f5ba89f74f9394122dc8a91bb12876d00.tar.xz |
Merge pull request #2589
8f0cea63 add a command_line function to check for defaulted options (moneromooo-monero)
Diffstat (limited to 'src/blockchain_utilities/blockchain_import.cpp')
-rw-r--r-- | src/blockchain_utilities/blockchain_import.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/blockchain_utilities/blockchain_import.cpp b/src/blockchain_utilities/blockchain_import.cpp index 0a7efccc1..2a956dbdb 100644 --- a/src/blockchain_utilities/blockchain_import.cpp +++ b/src/blockchain_utilities/blockchain_import.cpp @@ -651,7 +651,7 @@ int main(int argc, char* argv[]) return 1; } - if (! opt_batch && ! vm["batch-size"].defaulted()) + if (! opt_batch && !command_line::is_arg_defaulted(vm, arg_batch_size)) { std::cerr << "Error: batch-size set, but batch option not enabled" << ENDL; return 1; @@ -661,7 +661,7 @@ int main(int argc, char* argv[]) std::cerr << "Error: batch-size must be > 0" << ENDL; return 1; } - if (opt_verify && vm["batch-size"].defaulted()) + if (opt_verify && command_line::is_arg_defaulted(vm, arg_batch_size)) { // usually want batch size default lower if verify on, so progress can be // frequently saved. @@ -680,7 +680,7 @@ int main(int argc, char* argv[]) db_arg_str = command_line::get_arg(vm, arg_database); mlog_configure(mlog_get_default_log_path("monero-blockchain-import.log"), true); - if (!vm["log-level"].defaulted()) + if (!command_line::is_arg_defaulted(vm, arg_log_level)) mlog_set_log(command_line::get_arg(vm, arg_log_level).c_str()); else mlog_set_log(std::string(std::to_string(log_level) + ",bcutil:INFO").c_str()); @@ -752,7 +752,7 @@ int main(int argc, char* argv[]) } core.get_blockchain_storage().get_db().set_batch_transactions(true); - if (! vm["pop-blocks"].defaulted()) + if (!command_line::is_arg_defaulted(vm, arg_pop_blocks)) { num_blocks = command_line::get_arg(vm, arg_pop_blocks); MINFO("height: " << core.get_blockchain_storage().get_current_blockchain_height()); @@ -761,7 +761,7 @@ int main(int argc, char* argv[]) return 0; } - if (! vm["drop-hard-fork"].defaulted()) + if (!command_line::is_arg_defaulted(vm, arg_drop_hf)) { MINFO("Dropping hard fork tables..."); core.get_blockchain_storage().get_db().drop_hard_fork_info(); |