aboutsummaryrefslogtreecommitdiff
path: root/src/wallet/wallet2.cpp
diff options
context:
space:
mode:
authorstoffu <stoffu@protonmail.ch>2018-06-12 12:44:40 +0900
committerstoffu <stoffu@protonmail.ch>2018-06-13 11:56:40 +0900
commit798dfcfe7993a3e114d9917cdaa4215feaa0125a (patch)
tree30c4a112efc77e17b20687e7a37608a4b95fd7c2 /src/wallet/wallet2.cpp
parentMerge pull request #3701 (diff)
downloadmonero-798dfcfe7993a3e114d9917cdaa4215feaa0125a.tar.xz
wallet: allow unspendable unmixable outputs to be discarded
Diffstat (limited to '')
-rw-r--r--src/wallet/wallet2.cpp10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/wallet/wallet2.cpp b/src/wallet/wallet2.cpp
index d2db45f12..894049238 100644
--- a/src/wallet/wallet2.cpp
+++ b/src/wallet/wallet2.cpp
@@ -8257,6 +8257,16 @@ std::vector<wallet2::pending_tx> wallet2::create_unmixable_sweep_transactions(bo
return create_transactions_from(m_account_public_address, false, unmixable_transfer_outputs, unmixable_dust_outputs, 0 /*fake_outs_count */, 0 /* unlock_time */, 1 /*priority */, std::vector<uint8_t>(), trusted_daemon);
}
+//----------------------------------------------------------------------------------------------------
+void wallet2::discard_unmixable_outputs(bool trusted_daemon)
+{
+ // may throw
+ std::vector<size_t> unmixable_outputs = select_available_unmixable_outputs(trusted_daemon);
+ for (size_t idx : unmixable_outputs)
+ {
+ m_transfers[idx].m_spent = true;
+ }
+}
bool wallet2::get_tx_key(const crypto::hash &txid, crypto::secret_key &tx_key, std::vector<crypto::secret_key> &additional_tx_keys) const
{