mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-11-12 23:18:14 +01:00
Introduce a Shuffle for FastRandomContext and use it in wallet and coinselection
This commit is contained in:
@@ -223,7 +223,7 @@ bool KnapsackSolver(const CAmount& nTargetValue, std::vector<OutputGroup>& group
|
||||
std::vector<OutputGroup> applicable_groups;
|
||||
CAmount nTotalLower = 0;
|
||||
|
||||
random_shuffle(groups.begin(), groups.end(), GetRandInt);
|
||||
Shuffle(groups.begin(), groups.end(), FastRandomContext());
|
||||
|
||||
for (const OutputGroup& group : groups) {
|
||||
if (group.m_value == nTargetValue) {
|
||||
|
||||
Reference in New Issue
Block a user