diff options
| author | Chris Moore <[email protected]> | 2012-04-07 10:52:40 -0700 |
|---|---|---|
| committer | Luke Dashjr <[email protected]> | 2012-06-04 16:36:39 +0000 |
| commit | e333ab56d5b9fd6b0510ef6b98caa8bfc5059082 (patch) | |
| tree | f5c97d9e926002a326b1882a0187a875b75d430a /src/wallet.cpp | |
| parent | Refactor SelectCoinsMinConf() and add unit tests. (diff) | |
| download | discoin-e333ab56d5b9fd6b0510ef6b98caa8bfc5059082.tar.xz discoin-e333ab56d5b9fd6b0510ef6b98caa8bfc5059082.zip | |
Move the random_shuffle call back into SelectCoinsMinConf() so we can unit test it.
Diffstat (limited to 'src/wallet.cpp')
| -rw-r--r-- | src/wallet.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/wallet.cpp b/src/wallet.cpp index f7e931dbb..36dbe7aeb 100644 --- a/src/wallet.cpp +++ b/src/wallet.cpp @@ -926,6 +926,8 @@ bool CWallet::SelectCoinsMinConf(int64 nTargetValue, int nConfMine, int nConfThe vector<pair<int64, pair<const CWalletTx*,unsigned int> > > vValue; int64 nTotalLower = 0; + random_shuffle(vCoins.begin(), vCoins.end(), GetRandInt); + BOOST_FOREACH(COutput output, vCoins) { const CWalletTx *pcoin = output.tx; |