aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMurch <[email protected]>2015-12-07 18:35:29 +0100
committerMurch <[email protected]>2016-01-05 22:03:43 +0100
commit96efcadfc0d8a84066982533c676072d3b5d8314 (patch)
tree3c639f001f1682d0e210e7784fe2fe0b6c45f51e
parentMerge pull request #6589 (diff)
downloaddiscoin-96efcadfc0d8a84066982533c676072d3b5d8314.tar.xz
discoin-96efcadfc0d8a84066982533c676072d3b5d8314.zip
Improved readability of sorting for coin selection.
Future proofing added lines
-rw-r--r--src/wallet/wallet.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/wallet/wallet.cpp b/src/wallet/wallet.cpp
index d23d54e67..0e1425640 100644
--- a/src/wallet/wallet.cpp
+++ b/src/wallet/wallet.cpp
@@ -1701,7 +1701,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;