Introduce a Shuffle for FastRandomContext and use it in wallet and coinselection

This commit is contained in:
Pieter Wuille committed 2018-12-12 14:22:12 -08:00
1 parent 8098379be5
commit 3db746beb4
4 files changed
+60 -3

No files matched your search

+1 -1
View File
@@ -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) {