From 214d251c48f66e9ba125b27d5313a3608063f4cb Mon Sep 17 00:00:00 2001 From: stoffu Date: Wed, 31 Jan 2018 10:37:54 +0900 Subject: wallet: suggest the use of sweep_unmixable when not_enough_outs_to_mix is thrown --- src/simplewallet/simplewallet.cpp | 1 + src/wallet/api/wallet.cpp | 1 + src/wallet/wallet_rpc_server.cpp | 2 +- 3 files changed, 3 insertions(+), 1 deletion(-) diff --git a/src/simplewallet/simplewallet.cpp b/src/simplewallet/simplewallet.cpp index a6cef1bb9..40a6488cb 100644 --- a/src/simplewallet/simplewallet.cpp +++ b/src/simplewallet/simplewallet.cpp @@ -397,6 +397,7 @@ namespace { writer << "\n" << tr("output amount") << " = " << print_money(outs_for_amount.first) << ", " << tr("found outputs to use") << " = " << outs_for_amount.second; } + writer << tr("Please use sweep_unmixable."); } catch (const tools::error::tx_not_constructed&) { diff --git a/src/wallet/api/wallet.cpp b/src/wallet/api/wallet.cpp index 82948081e..4a318f60e 100644 --- a/src/wallet/api/wallet.cpp +++ b/src/wallet/api/wallet.cpp @@ -1198,6 +1198,7 @@ PendingTransaction *WalletImpl::createTransaction(const string &dst_addr, const for (const std::pair outs_for_amount : e.scanty_outs()) { writer << "\n" << tr("output amount") << " = " << print_money(outs_for_amount.first) << ", " << tr("found outputs to use") << " = " << outs_for_amount.second; } + writer << "\n" << tr("Please sweep unmixable outputs."); m_errorString = writer.str(); m_status = Status_Error; } catch (const tools::error::tx_not_constructed&) { diff --git a/src/wallet/wallet_rpc_server.cpp b/src/wallet/wallet_rpc_server.cpp index 97faf0b56..11067ee2c 100644 --- a/src/wallet/wallet_rpc_server.cpp +++ b/src/wallet/wallet_rpc_server.cpp @@ -2425,7 +2425,7 @@ namespace tools catch (const tools::error::not_enough_outs_to_mix& e) { er.code = WALLET_RPC_ERROR_CODE_NOT_ENOUGH_OUTS_TO_MIX; - er.message = e.what(); + er.message = e.what() + std::string(" Please use sweep_dust."); } catch (const error::file_exists& e) { -- cgit v1.2.3