diff options
author | Riccardo Spagni <ric@spagni.net> | 2018-11-04 20:44:27 +0200 |
---|---|---|
committer | Riccardo Spagni <ric@spagni.net> | 2018-11-04 20:44:27 +0200 |
commit | d394c50f7b35083ffe8b1f834490d6d7f9f609da (patch) | |
tree | f05548385211bda253fa8d36575faa46f0bbe6ae /src | |
parent | Merge pull request #4685 (diff) | |
parent | wallet2/create_transactions_2: removed extraneous shuffle before sort of unus... (diff) | |
download | monero-d394c50f7b35083ffe8b1f834490d6d7f9f609da.tar.xz |
Merge pull request #4686
cf646e3a wallet2/create_transactions_2: removed extraneous shuffle before sort of unused_*_indices_per_subaddr (Paul Shapiro)
Diffstat (limited to 'src')
-rw-r--r-- | src/wallet/wallet2.cpp | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/src/wallet/wallet2.cpp b/src/wallet/wallet2.cpp index 27a786f67..022335e9a 100644 --- a/src/wallet/wallet2.cpp +++ b/src/wallet/wallet2.cpp @@ -8449,12 +8449,8 @@ std::vector<wallet2::pending_tx> wallet2::create_transactions_2(std::vector<cryp } } - // shuffle & sort output indices + // sort output indices { - std::random_device rd; - std::mt19937 g(rd()); - std::shuffle(unused_transfers_indices_per_subaddr.begin(), unused_transfers_indices_per_subaddr.end(), g); - std::shuffle(unused_dust_indices_per_subaddr.begin(), unused_dust_indices_per_subaddr.end(), g); auto sort_predicate = [&unlocked_balance_per_subaddr] (const std::pair<uint32_t, std::vector<size_t>>& x, const std::pair<uint32_t, std::vector<size_t>>& y) { return unlocked_balance_per_subaddr[x.first] > unlocked_balance_per_subaddr[y.first]; |