git://git.novaco.in
/
novacoin.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
(from parent 1:
c36e0f1
)
Improved readability of sorting for coin selection.
author
Murch
<alszacrel@web.de>
Fri, 29 Nov 2019 13:15:28 +0000 (15:15 +0200)
committer
Laser9un
<laser9un@gmail.com>
Fri, 29 Nov 2019 13:15:28 +0000 (15:15 +0200)
src/wallet.cpp
patch
|
blob
|
history
diff --git
a/src/wallet.cpp
b/src/wallet.cpp
index
9140710
..
2455b27
100644
(file)
--- a/
src/wallet.cpp
+++ b/
src/wallet.cpp
@@
-1888,7
+1888,8
@@
bool CWallet::SelectCoinsMinConf(int64_t nTargetValue, unsigned int nSpendTime,
}
// 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;
int64_t nBest;