mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-01-25 18:53:23 -03:00
Merge #7183: Improved readability of ApproximateBestSubset
96efcad
Improved readability of sorting for coin selection. (Murch)
This commit is contained in:
commit
b92ea98503
1 changed files with 2 additions and 1 deletions
|
@ -1799,7 +1799,8 @@ bool CWallet::SelectCoinsMinConf(const CAmount& nTargetValue, int nConfMine, int
|
||||||
}
|
}
|
||||||
|
|
||||||
// Solve subset sum by stochastic approximation
|
// Solve subset sum by stochastic approximation
|
||||||
sort(vValue.rbegin(), vValue.rend(), CompareValueOnly());
|
std::sort(vValue.begin(), vValue.end(), CompareValueOnly());
|
||||||
|
std::reverse(vValue.begin(), vValue.end());
|
||||||
vector<char> vfBest;
|
vector<char> vfBest;
|
||||||
CAmount nBest;
|
CAmount nBest;
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue