aboutsummaryrefslogtreecommitdiff
path: root/src/cryptonote_core
diff options
context:
space:
mode:
authorRiccardo Spagni <ric@spagni.net>2017-08-07 15:09:31 +0200
committerRiccardo Spagni <ric@spagni.net>2017-08-07 15:09:31 +0200
commit61ac6983f29c021f9a8c13f221d5c8fbfcf9fe47 (patch)
tree07f690ec4209e000844eee18f47760b867e758d9 /src/cryptonote_core
parentMerge pull request #2203 (diff)
parentcore: randomly shuffle outputs (diff)
downloadmonero-61ac6983f29c021f9a8c13f221d5c8fbfcf9fe47.tar.xz
Merge pull request #2206
340feede core: randomly shuffle outputs (moneromooo-monero)
Diffstat (limited to 'src/cryptonote_core')
-rw-r--r--src/cryptonote_core/cryptonote_tx_utils.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/cryptonote_core/cryptonote_tx_utils.cpp b/src/cryptonote_core/cryptonote_tx_utils.cpp
index 26d5fb767..abb4b31ec 100644
--- a/src/cryptonote_core/cryptonote_tx_utils.cpp
+++ b/src/cryptonote_core/cryptonote_tx_utils.cpp
@@ -265,7 +265,7 @@ namespace cryptonote
// "Shuffle" outs
std::vector<tx_destination_entry> shuffled_dsts(destinations);
- std::sort(shuffled_dsts.begin(), shuffled_dsts.end(), [](const tx_destination_entry& de1, const tx_destination_entry& de2) { return de1.amount < de2.amount; } );
+ std::random_shuffle(shuffled_dsts.begin(), shuffled_dsts.end(), [](int i) { return crypto::rand<int>() % i; });
uint64_t summary_outs_money = 0;
//fill outputs