From 2bf029be172a47ace8134143e1320fdb10d3ea44 Mon Sep 17 00:00:00 2001 From: moneromooo-monero Date: Sat, 28 Jan 2017 15:07:15 +0000 Subject: wallet2: fix corner case failing to send a second output If a rct transaction can be made with just one input, a second output will be added. This output will be the smallest amount output available. However, if this output is a non rct output with less available fake outs than requested, the transaction will be rejected. We now check the histogram to only consider outputs with enough available fake outs in the first place. --- src/wallet/wallet2.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/wallet/wallet2.cpp b/src/wallet/wallet2.cpp index 4348b8a62..cc12f275c 100644 --- a/src/wallet/wallet2.cpp +++ b/src/wallet/wallet2.cpp @@ -4119,7 +4119,8 @@ std::vector wallet2::create_transactions_2(std::vector unused_indices = select_available_outputs_from_histogram(fake_outs_count + 1, true, true, trusted_daemon); + for (size_t i: unused_indices) { const transfer_details& td = m_transfers[i]; if (!td.m_spent && (use_rct ? true : !td.is_rct()) && is_transfer_unlocked(td)) -- cgit v1.2.3