diff options
| author | Wladimir J. van der Laan <[email protected]> | 2016-01-20 15:54:22 +0100 |
|---|---|---|
| committer | Wladimir J. van der Laan <[email protected]> | 2016-01-20 15:55:03 +0100 |
| commit | b92ea98503e64ea6ddc5c04b879e59b1755d5efc (patch) | |
| tree | 14a1abcf9c346bf292b41321d1131bf8db594264 /src/wallet/wallet.cpp | |
| parent | Merge #7307: [RPC, Wallet] Move RPC dispatch table registration to wallet/ code (diff) | |
| parent | Improved readability of sorting for coin selection. (diff) | |
| download | discoin-b92ea98503e64ea6ddc5c04b879e59b1755d5efc.tar.xz discoin-b92ea98503e64ea6ddc5c04b879e59b1755d5efc.zip | |
Merge #7183: Improved readability of ApproximateBestSubset
96efcad Improved readability of sorting for coin selection. (Murch)
Diffstat (limited to 'src/wallet/wallet.cpp')
| -rw-r--r-- | src/wallet/wallet.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/wallet/wallet.cpp b/src/wallet/wallet.cpp index cbc71aa16..5b8bd5549 100644 --- a/src/wallet/wallet.cpp +++ b/src/wallet/wallet.cpp @@ -1799,7 +1799,8 @@ bool CWallet::SelectCoinsMinConf(const CAmount& nTargetValue, int nConfMine, int } // 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; CAmount nBest; |