mirror of
https://github.com/monero-project/monero.git
synced 2026-01-07 02:04:02 -08:00
Merge bitmonero@monero-project
This commit is contained in:
@@ -38,7 +38,6 @@ namespace
|
||||
const command_line::arg_descriptor<std::string> arg_daemon_address = {"daemon-address", "Use daemon instance at <host>:<port>", ""};
|
||||
const command_line::arg_descriptor<std::string> arg_daemon_host = {"daemon-host", "Use daemon instance at host <arg> instead of localhost", ""};
|
||||
const command_line::arg_descriptor<std::string> arg_password = {"password", "Wallet password", "", true};
|
||||
const command_line::arg_descriptor<std::string> arg_exit_after_cmd = {"exit-after-cmd", "Will not enter in the CLI console after command execution. Default: false", ""};
|
||||
const command_line::arg_descriptor<int> arg_daemon_port = {"daemon-port", "Use daemon instance at port <arg> instead of 8081", 0};
|
||||
const command_line::arg_descriptor<uint32_t> arg_log_level = {"set_log", "", 0, true};
|
||||
|
||||
@@ -203,7 +202,7 @@ bool simple_wallet::set_log(const std::vector<std::string> &args)
|
||||
return true;
|
||||
}
|
||||
uint16_t l = 0;
|
||||
if(!string_tools::get_xtype_from_string(l, args[0]))
|
||||
if(!epee::string_tools::get_xtype_from_string(l, args[0]))
|
||||
{
|
||||
fail_msg_writer() << "wrong number format, use: set_log <log_level_number_0-4>";
|
||||
return true;
|
||||
@@ -230,8 +229,8 @@ bool simple_wallet::ask_wallet_create_if_needed()
|
||||
wallet_path = string_tools::trim(wallet_path);
|
||||
|
||||
bool keys_file_exists;
|
||||
bool wallet_file_exitst;
|
||||
tools::wallet2::wallet_exists(wallet_path, keys_file_exists, wallet_file_exitst);
|
||||
bool wallet_file_exists;
|
||||
tools::wallet2::wallet_exists(wallet_path, keys_file_exists, wallet_file_exists);
|
||||
|
||||
bool r;
|
||||
if(keys_file_exists)
|
||||
@@ -240,7 +239,7 @@ bool simple_wallet::ask_wallet_create_if_needed()
|
||||
r = true;
|
||||
}else
|
||||
{
|
||||
if(!wallet_file_exitst)
|
||||
if(!wallet_file_exists)
|
||||
{
|
||||
std::cout << "The wallet doesn't exist, generating new one" << std::endl;
|
||||
m_generate_new = wallet_path;
|
||||
@@ -750,7 +749,7 @@ bool simple_wallet::transfer(const std::vector<std::string> &args_)
|
||||
}
|
||||
|
||||
size_t fake_outs_count;
|
||||
if(!string_tools::get_xtype_from_string(fake_outs_count, local_args[0]))
|
||||
if(!epee::string_tools::get_xtype_from_string(fake_outs_count, local_args[0]))
|
||||
{
|
||||
fail_msg_writer() << "mixin_count should be non-negative integer, got " << local_args[0];
|
||||
return true;
|
||||
@@ -929,7 +928,6 @@ int main(int argc, char* argv[])
|
||||
command_line::add_arg(desc_params, arg_daemon_host);
|
||||
command_line::add_arg(desc_params, arg_daemon_port);
|
||||
command_line::add_arg(desc_params, arg_command);
|
||||
command_line::add_arg(desc_params, arg_exit_after_cmd);
|
||||
command_line::add_arg(desc_params, arg_log_level);
|
||||
tools::wallet_rpc_server::init_options(desc_params);
|
||||
|
||||
@@ -1056,20 +1054,20 @@ int main(int argc, char* argv[])
|
||||
|
||||
std::vector<std::string> command = command_line::get_arg(vm, arg_command);
|
||||
if (!command.empty())
|
||||
{
|
||||
w.process_command(command);
|
||||
|
||||
tools::signal_handler::install([&w] {
|
||||
w.stop();
|
||||
});
|
||||
|
||||
const std::string& exit_after_command = command_line::get_arg(vm, arg_exit_after_cmd);
|
||||
|
||||
/* Enters in CLI mode only if --exit-after-cmd is not set to true */
|
||||
if ( !boost::iequals(exit_after_command,"true") && !boost::iequals(exit_after_command,"yes") ) {
|
||||
w.run();
|
||||
w.deinit();
|
||||
}
|
||||
else
|
||||
{
|
||||
tools::signal_handler::install([&w] {
|
||||
w.stop();
|
||||
});
|
||||
w.run();
|
||||
|
||||
w.deinit();
|
||||
w.deinit();
|
||||
}
|
||||
}
|
||||
return 0;
|
||||
//CATCH_ENTRY_L0("main", 1);
|
||||
|
||||
Reference in New Issue
Block a user