mirror of
https://git.wownero.com/wownero/wownero.git
synced 2024-08-15 01:03:23 +00:00
Merge pull request #2972
586ee642
simplewallet: lock idle scope in {im,ex}port_{key_images,outputs} (moneromooo-monero)
This commit is contained in:
commit
c951bf1f72
1 changed files with 4 additions and 0 deletions
|
@ -6195,6 +6195,7 @@ bool simple_wallet::export_key_images(const std::vector<std::string> &args)
|
|||
|
||||
try
|
||||
{
|
||||
LOCK_IDLE_SCOPE();
|
||||
if (!m_wallet->export_key_images(filename))
|
||||
{
|
||||
fail_msg_writer() << tr("failed to save file ") << filename;
|
||||
|
@ -6227,6 +6228,7 @@ bool simple_wallet::import_key_images(const std::vector<std::string> &args)
|
|||
}
|
||||
std::string filename = args[0];
|
||||
|
||||
LOCK_IDLE_SCOPE();
|
||||
try
|
||||
{
|
||||
uint64_t spent = 0, unspent = 0;
|
||||
|
@ -6258,6 +6260,7 @@ bool simple_wallet::export_outputs(const std::vector<std::string> &args)
|
|||
if (m_wallet->ask_password() && !get_and_verify_password()) { return true; }
|
||||
std::string filename = args[0];
|
||||
|
||||
LOCK_IDLE_SCOPE();
|
||||
try
|
||||
{
|
||||
std::vector<tools::wallet2::transfer_details> outs = m_wallet->export_outputs();
|
||||
|
@ -6356,6 +6359,7 @@ bool simple_wallet::import_outputs(const std::vector<std::string> &args)
|
|||
boost::archive::binary_iarchive ar(iss);
|
||||
ar >> outputs;
|
||||
}
|
||||
LOCK_IDLE_SCOPE();
|
||||
size_t n_outputs = m_wallet->import_outputs(outputs);
|
||||
success_msg_writer() << boost::lexical_cast<std::string>(n_outputs) << " outputs imported";
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue