aboutsummaryrefslogtreecommitdiff
path: root/src/wallet.cpp
diff options
context:
space:
mode:
authorLuke Dashjr <[email protected]>2012-04-22 10:05:43 -0400
committerLuke Dashjr <[email protected]>2012-04-22 10:05:43 -0400
commita93ab877877925c60b2dbf56bdde8aa46b6b7391 (patch)
tree3c473dd4151e38a72763600839a16f4a3b509325 /src/wallet.cpp
parentAdd missing breaks in optionmodel's switch case (diff)
parentAdd missing includes. (Fix bulding under GCC 4.7) (diff)
downloaddiscoin-a93ab877877925c60b2dbf56bdde8aa46b6b7391.tar.xz
discoin-a93ab877877925c60b2dbf56bdde8aa46b6b7391.zip
Merge branch '0.4.x' into 0.5.x
Conflicts: src/main.cpp
Diffstat (limited to 'src/wallet.cpp')
-rw-r--r--src/wallet.cpp14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/wallet.cpp b/src/wallet.cpp
index 43c9656f7..7d1266e80 100644
--- a/src/wallet.cpp
+++ b/src/wallet.cpp
@@ -514,7 +514,7 @@ void CWalletTx::AddSupportingTransactions(CTxDB& txdb)
{
map<uint256, const CMerkleTx*> mapWalletPrev;
set<uint256> setAlreadyDone;
- for (int i = 0; i < vWorkQueue.size(); i++)
+ for (unsigned int i = 0; i < vWorkQueue.size(); i++)
{
uint256 hash = vWorkQueue[i];
if (setAlreadyDone.count(hash))
@@ -612,7 +612,7 @@ void CWallet::ReacceptWalletTransactions()
printf("ERROR: ReacceptWalletTransactions() : txindex.vSpent.size() %d != wtx.vout.size() %d\n", txindex.vSpent.size(), wtx.vout.size());
continue;
}
- for (int i = 0; i < txindex.vSpent.size(); i++)
+ for (unsigned int i = 0; i < txindex.vSpent.size(); i++)
{
if (wtx.IsSpent(i))
continue;
@@ -791,7 +791,7 @@ bool CWallet::SelectCoinsMinConf(int64 nTargetValue, int nConfMine, int nConfThe
if (nDepth < (pcoin->IsFromMe() ? nConfMine : nConfTheirs))
continue;
- for (int i = 0; i < pcoin->vout.size(); i++)
+ for (unsigned int i = 0; i < pcoin->vout.size(); i++)
{
if (pcoin->IsSpent(i) || !IsMine(pcoin->vout[i]))
continue;
@@ -824,7 +824,7 @@ bool CWallet::SelectCoinsMinConf(int64 nTargetValue, int nConfMine, int nConfThe
if (nTotalLower == nTargetValue || nTotalLower == nTargetValue + CENT)
{
- for (int i = 0; i < vValue.size(); ++i)
+ for (unsigned int i = 0; i < vValue.size(); ++i)
{
setCoinsRet.insert(vValue[i].second);
nValueRet += vValue[i].first;
@@ -857,7 +857,7 @@ bool CWallet::SelectCoinsMinConf(int64 nTargetValue, int nConfMine, int nConfThe
bool fReachedTarget = false;
for (int nPass = 0; nPass < 2 && !fReachedTarget; nPass++)
{
- for (int i = 0; i < vValue.size(); i++)
+ for (unsigned int i = 0; i < vValue.size(); i++)
{
if (nPass == 0 ? rand() % 2 : !vfIncluded[i])
{
@@ -886,7 +886,7 @@ bool CWallet::SelectCoinsMinConf(int64 nTargetValue, int nConfMine, int nConfThe
nValueRet += coinLowestLarger.first;
}
else {
- for (int i = 0; i < vValue.size(); i++)
+ for (unsigned int i = 0; i < vValue.size(); i++)
if (vfBest[i])
{
setCoinsRet.insert(vValue[i].second);
@@ -895,7 +895,7 @@ bool CWallet::SelectCoinsMinConf(int64 nTargetValue, int nConfMine, int nConfThe
//// debug print
printf("SelectCoins() best subset: ");
- for (int i = 0; i < vValue.size(); i++)
+ for (unsigned int i = 0; i < vValue.size(); i++)
if (vfBest[i])
printf("%s ", FormatMoney(vValue[i].first).c_str());
printf("total %s\n", FormatMoney(nBest).c_str());