diff --git a/src/wallet/wallet.cpp b/src/wallet/wallet.cpp index a1be221c6..f970b8191 100755 --- a/src/wallet/wallet.cpp +++ b/src/wallet/wallet.cpp @@ -2467,8 +2467,9 @@ bool CWallet::SelectCoins(const std::vector& vAvailableCoins, const CAm std::set time; for(it=vCoinsTmp.begin();it!=vCoinsTmp.end();it++) time.insert(it->tx->nTimeReceived); //nTimeReceived is the received time of the UTXO - + //store UTXOs in vCoins in the ascending order of time + std::reverse(vCoinsTmp.begin(),vCoinsTmp.end()); std::vector vCoins; vCoins.clear(); for(std::set::iterator its = time.begin();its!=time.end();its++)