aboutsummaryrefslogtreecommitdiff
path: root/src/wallet/wallet2.cpp
diff options
context:
space:
mode:
authorPaul Shapiro <paulshapiro@users.noreply.github.com>2018-10-21 12:43:31 -0500
committerPaul Shapiro <paulshapiro@users.noreply.github.com>2018-10-21 12:43:31 -0500
commitcf646e3afe89fccb6a5f7bded2eae499b8fb19df (patch)
tree53e1996aedd9083976dc0627b7403f3bdadeb1d4 /src/wallet/wallet2.cpp
parentMerge pull request #4524 (diff)
downloadmonero-cf646e3afe89fccb6a5f7bded2eae499b8fb19df.tar.xz
wallet2/create_transactions_2: removed extraneous shuffle before sort of unused_*_indices_per_subaddr
Diffstat (limited to 'src/wallet/wallet2.cpp')
-rw-r--r--src/wallet/wallet2.cpp6
1 files changed, 1 insertions, 5 deletions
diff --git a/src/wallet/wallet2.cpp b/src/wallet/wallet2.cpp
index 6b3a8533e..04888d035 100644
--- a/src/wallet/wallet2.cpp
+++ b/src/wallet/wallet2.cpp
@@ -8404,12 +8404,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];