remove export_key command
This commit is contained in:
parent
0cbf1a8e37
commit
4f279b1c7d
|
@ -3300,9 +3300,6 @@ simple_wallet::simple_wallet()
|
|||
boost::bind(&simple_wallet::on_command, this, &simple_wallet::start_mining, _1),
|
||||
tr(USAGE_START_MINING),
|
||||
tr("Start mining in the daemon (bg_mining and ignore_battery are optional booleans)."));
|
||||
m_cmd_binder.set_handler("export_key",
|
||||
boost::bind(&simple_wallet::on_command, this, &simple_wallet::export_key, _1),
|
||||
tr("Export secret spend key used for mining."));
|
||||
m_cmd_binder.set_handler("stop_mining",
|
||||
boost::bind(&simple_wallet::on_command, this, &simple_wallet::stop_mining, _1),
|
||||
tr("Stop mining in the daemon."));
|
||||
|
@ -5522,25 +5519,6 @@ bool simple_wallet::start_mining(const std::vector<std::string>& args)
|
|||
return true;
|
||||
}
|
||||
//----------------------------------------------------------------------------------------------------
|
||||
bool simple_wallet::export_key(const std::vector<std::string>& args)
|
||||
{
|
||||
const auto pwd_container = get_and_verify_password();
|
||||
if (pwd_container)
|
||||
{
|
||||
crypto::secret_key skey;
|
||||
skey = m_wallet->get_account().get_keys().m_spend_secret_key;
|
||||
std::string skey_str;
|
||||
skey_str = epee::string_tools::pod_to_hex(skey);
|
||||
std::ofstream key_file;
|
||||
key_file.open("spend.key");
|
||||
key_file << skey_str;
|
||||
key_file.close();
|
||||
success_msg_writer() << tr("Secret spend key exported.");
|
||||
m_wallet->rewrite(m_wallet_file, pwd_container->password());
|
||||
}
|
||||
return true;
|
||||
}
|
||||
//----------------------------------------------------------------------------------------------------
|
||||
bool simple_wallet::stop_mining(const std::vector<std::string>& args)
|
||||
{
|
||||
if (!try_connect_to_daemon())
|
||||
|
|
|
@ -160,7 +160,6 @@ namespace cryptonote
|
|||
bool apropos(const std::vector<std::string> &args);
|
||||
bool scan_tx(const std::vector<std::string> &args);
|
||||
bool start_mining(const std::vector<std::string> &args);
|
||||
bool export_key(const std::vector<std::string> &args);
|
||||
bool stop_mining(const std::vector<std::string> &args);
|
||||
bool set_daemon(const std::vector<std::string> &args);
|
||||
bool save_bc(const std::vector<std::string> &args);
|
||||
|
|
Loading…
Reference in New Issue