mirror of
https://codeberg.org/anoncontributorxmr/monero.git
synced 2024-11-23 11:23:26 +01:00
Merge pull request #4686
cf646e3a
wallet2/create_transactions_2: removed extraneous shuffle before sort of unused_*_indices_per_subaddr (Paul Shapiro)
This commit is contained in:
commit
d394c50f7b
@ -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)
|
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];
|
return unlocked_balance_per_subaddr[x.first] > unlocked_balance_per_subaddr[y.first];
|
||||||
|
Loading…
Reference in New Issue
Block a user