From 794cfcc2673c1b4cb580de4b94b22f651612fb2a Mon Sep 17 00:00:00 2001 From: 0xFFFC0000 <0xFFFC0000@proton.me> Date: Wed, 13 Nov 2024 15:35:05 +0000 Subject: [PATCH] simplewallet: fix command argument and add skip_check_backround_mining arg. --- src/simplewallet/simplewallet.cpp | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/simplewallet/simplewallet.cpp b/src/simplewallet/simplewallet.cpp index 1863d11b8..2dcdf1105 100644 --- a/src/simplewallet/simplewallet.cpp +++ b/src/simplewallet/simplewallet.cpp @@ -186,7 +186,8 @@ namespace const command_line::arg_descriptor arg_subaddress_lookahead = {"subaddress-lookahead", tools::wallet2::tr("Set subaddress lookahead sizes to :"), ""}; const command_line::arg_descriptor arg_use_english_language_names = {"use-english-language-names", sw::tr("Display English language names"), false}; - const command_line::arg_descriptor< std::vector > arg_command = {"command", ""}; + const command_line::arg_descriptor< std::vector > arg_command = {"command", sw::tr("Command for wallet to run it. E.g. --command help all.")}; + const command_line::arg_descriptor arg_skip_check_backround_mining = {"skip-checking-background-mining", sw::tr("Skip checking backround mining during startup."), true}; const char* USAGE_START_MINING("start_mining [] [bg_mining] [ignore_battery]"); const char* USAGE_SET_DAEMON("set_daemon [:] [trusted|untrusted|this-is-probably-a-spy-node]"); @@ -4626,8 +4627,8 @@ bool simple_wallet::init(const boost::program_options::variables_map& vm) m_wallet->callback(this); - bool skip_check_backround_mining = !command_line::get_arg(vm, arg_command).empty(); - if (!skip_check_backround_mining) + bool skip_check_backround_mining = !command_line::get_arg(vm, arg_skip_check_backround_mining); + if (skip_check_backround_mining) check_background_mining(password); if (welcome) @@ -10418,6 +10419,7 @@ int main(int argc, char* argv[]) command_line::add_arg(desc_params, arg_generate_from_json); command_line::add_arg(desc_params, arg_mnemonic_language); command_line::add_arg(desc_params, arg_command); + command_line::add_arg(desc_params, arg_skip_check_backround_mining); command_line::add_arg(desc_params, arg_restore_deterministic_wallet ); command_line::add_arg(desc_params, arg_restore_from_seed );