Introduce a Shuffle for FastRandomContext and use it in wallet and coinselection
This commit is contained in:
1 parent
8098379be5
commit
3db746beb4
4 files changed
+60
-3
No files matched your search
@@ -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