diff options
author | Riccardo Spagni <ric@spagni.net> | 2017-02-02 21:35:31 +0200 |
---|---|---|
committer | Riccardo Spagni <ric@spagni.net> | 2017-02-02 21:35:31 +0200 |
commit | 011c5a8a7ca2bc3ced9e185c514a39ba71e38370 (patch) | |
tree | ef5eb6ff721e1b3c856320cf6fe2a7e9a27263d8 /src | |
parent | Merge pull request #1646 (diff) | |
parent | wallet2: fix corner case failing to send a second output (diff) | |
download | monero-011c5a8a7ca2bc3ced9e185c514a39ba71e38370.tar.xz |
Merge pull request #1647
2bf029be wallet2: fix corner case failing to send a second output (moneromooo-monero)
Diffstat (limited to 'src')
-rw-r--r-- | src/wallet/wallet2.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/wallet/wallet2.cpp b/src/wallet/wallet2.cpp index 9fd98056a..858538c1e 100644 --- a/src/wallet/wallet2.cpp +++ b/src/wallet/wallet2.cpp @@ -4112,7 +4112,8 @@ std::vector<wallet2::pending_tx> wallet2::create_transactions_2(std::vector<cryp THROW_WALLET_EXCEPTION_IF(needed_money == 0, error::zero_destination); // gather all our dust and non dust outputs - for (size_t i = 0; i < m_transfers.size(); ++i) + const std::vector<size_t> 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)) |