diff options
author | luigi1111 <luigi1111w@gmail.com> | 2018-06-27 16:25:03 -0500 |
---|---|---|
committer | luigi1111 <luigi1111w@gmail.com> | 2018-06-27 16:25:03 -0500 |
commit | 5eb2e01216e32beb9d0103095e0391aec12a1e8f (patch) | |
tree | 31809a4990a5a64ce8dbe25e758f24e5d535f11b /src/simplewallet | |
parent | Merge pull request #3987 (diff) | |
parent | wallet: allow unspendable unmixable outputs to be discarded (diff) | |
download | monero-5eb2e01216e32beb9d0103095e0391aec12a1e8f.tar.xz |
Merge pull request #3991
798dfcf wallet: allow unspendable unmixable outputs to be discarded (stoffu)
Diffstat (limited to 'src/simplewallet')
-rw-r--r-- | src/simplewallet/simplewallet.cpp | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/src/simplewallet/simplewallet.cpp b/src/simplewallet/simplewallet.cpp index e82c1a3c7..17cafc7bc 100644 --- a/src/simplewallet/simplewallet.cpp +++ b/src/simplewallet/simplewallet.cpp @@ -4940,6 +4940,20 @@ bool simple_wallet::sweep_unmixable(const std::vector<std::string> &args_) commit_or_save(ptx_vector, m_do_not_relay); } } + catch (const tools::error::not_enough_unlocked_money& e) + { + fail_msg_writer() << tr("Not enough money in unlocked balance"); + std::string accepted = input_line((boost::format(tr("Discarding %s of unmixable outputs that cannot be spent, which can be undone by \"rescan_spent\". Is this okay? (Y/Yes/N/No): ")) % print_money(e.available())).str()); + if (std::cin.eof()) + return true; + if (command_line::is_yes(accepted)) + { + try + { + m_wallet->discard_unmixable_outputs(is_daemon_trusted()); + } catch (...) {} + } + } catch (const std::exception &e) { handle_transfer_exception(std::current_exception(), is_daemon_trusted()); |