Browse Source

Merge #7183: Improved readability of ApproximateBestSubset

96efcad Improved readability of sorting for coin selection. (Murch)
0.13
Wladimir J. van der Laan 9 years ago
parent
commit
b92ea98503
No known key found for this signature in database
GPG Key ID: 74810B012346C9A6
  1. 3
      src/wallet/wallet.cpp

3
src/wallet/wallet.cpp

@ -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…
Cancel
Save