diff options
author | Riccardo Spagni <ric@spagni.net> | 2017-08-07 15:09:31 +0200 |
---|---|---|
committer | Riccardo Spagni <ric@spagni.net> | 2017-08-07 15:09:31 +0200 |
commit | 61ac6983f29c021f9a8c13f221d5c8fbfcf9fe47 (patch) | |
tree | 07f690ec4209e000844eee18f47760b867e758d9 /src/cryptonote_core | |
parent | Merge pull request #2203 (diff) | |
parent | core: randomly shuffle outputs (diff) | |
download | monero-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.cpp | 2 |
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 |