Refactoring
authorMASM fan <masmfan@gmail.com>
Mon, 24 Nov 2014 17:48:55 +0000 (21:48 +0400)
committerMASM fan <masmfan@gmail.com>
Mon, 24 Nov 2014 17:48:55 +0000 (21:48 +0400)
Change encoding of kernelrecord.cpp file to UTF-8;
Use correct format specifier for size_t variables.

src/kernelrecord.cpp
src/wallet.cpp

index 8c1d778..54f71e9 100644 (file)
@@ -33,11 +33,11 @@ vector<KernelRecord> KernelRecord::decomposeOutput(const CWallet *wallet, const
     int64 nTime = wtx.GetTxTime();
     uint256 hash = wtx.GetHash();
     std::map<std::string, std::string> mapValue = wtx.mapValue;
-    int64 nDayWeight = (min((GetAdjustedTime() - nTime), (int64)(nStakeMaxAge+nStakeMinAge)) - nStakeMinAge); // DayWeight * 86400, ÷òîáû áûë
-                                                                                                              // ïðàâèëüíûé ðàñ÷¸ò CoinAge                                                         
+    int64 nDayWeight = (min((GetAdjustedTime() - nTime), (int64)(nStakeMaxAge+nStakeMinAge)) - nStakeMinAge); // DayWeight * 86400, чтобы был
+                                                                                                              // правильный расчёт CoinAge
     if (showTransaction(wtx))
     {
-        for (int nOut = 0; nOut < wtx.vout.size(); nOut++)
+        for (unsigned int nOut = 0; nOut < wtx.vout.size(); nOut++)
         {
             CTxOut txOut = wtx.vout[nOut];
             if( wallet->IsMine(txOut) ) {
index 96dbdeb..87e487f 100644 (file)
@@ -1681,7 +1681,7 @@ bool CWallet::GetStakeWeight(const CKeyStore& keystore, uint64& nMinWeight, uint
             }
 
             if (fDebug)
-                printf("Get stake weight: %d meta items loaded for %d coins\n", mapMeta.size(), setCoins.size());
+                printf("Get stake weight: %"PRIszu" meta items loaded for %"PRIszu" coins\n", mapMeta.size(), setCoins.size());
 
             fCoinsDataActual = true;
         }
@@ -1914,7 +1914,7 @@ bool CWallet::CreateCoinStake(const CKeyStore& keystore, unsigned int nBits, int
             }
 
             if (fDebug)
-                printf("Stake miner: %d meta items loaded for %d coins\n", mapMeta.size(), setCoins.size());
+                printf("Stake miner: %"PRIszu" meta items loaded for %"PRIszu" coins\n", mapMeta.size(), setCoins.size());
 
             fCoinsDataActual = true;
         }