int64 CWalletTx::GetTxTime() const
{
- int64 n = nTimeSmart;
- return n ? n : nTimeReceived;
+ return nTime;
}
int CWalletTx::GetRequestCount() const
// Update fSpent if a tx got spent somewhere else by a copy of wallet.dat
if (txindex.vSpent.size() != wtx.vout.size())
{
- printf("ERROR: ReacceptWalletTransactions() : txindex.vSpent.size() %"PRIszu" != wtx.vout.size() %"PRIszu"\n", txindex.vSpent.size(), wtx.vout.size());
+ printf("ERROR: ReacceptWalletTransactions() : txindex.vSpent.size() %" PRIszu " != wtx.vout.size() %" PRIszu "\n", txindex.vSpent.size(), wtx.vout.size());
continue;
}
for (unsigned int i = 0; i < txindex.vSpent.size(); i++)
{
static uint64 nLastKernels = 0, nLastCoinDays = 0;
static float nLastKernelsRate = 0, nLastCoinDaysRate = 0;
- static unsigned int nLastTime = GetTime();
-
+ static int64 nLastTime = GetTime();
if (nKernelsTried < nLastKernels)
{
nLastTime = GetTime();
}
- unsigned int nInterval = GetTime() - nLastTime;
- if (nKernelsTried > 1000 && nInterval > 5)
+ int64 nInterval = GetTime() - nLastTime;
+ //if (nKernelsTried > 1000 && nInterval > 5)
+ if (nInterval > 10)
{
nKernelsRate = nLastKernelsRate = ( nKernelsTried - nLastKernels ) / (float) nInterval;
nCoinDaysRate = nLastCoinDaysRate = ( nCoinDaysTried - nLastCoinDays ) / (float) nInterval;
}
if (fDebug)
- printf("Stake miner: %"PRIszu" meta items loaded for %"PRIszu" coins\n", mapMeta.size(), setCoins.size());
+ printf("Stake miner: %" PRIszu " meta items loaded for %" PRIszu " coins\n", mapMeta.size(), setCoins.size());
fCoinsDataActual = true;
nKernelsTried = 0;
if (block.IsProofOfWork() && mapWallet.count(block.vtx[0].GetHash()))
{
CWalletTx& wtx = mapWallet[block.vtx[0].GetHash()];
- printf(" mine: %d %d %"PRI64d"", wtx.GetDepthInMainChain(), wtx.GetBlocksToMaturity(), wtx.GetCredit());
+ printf(" mine: %d %d %" PRI64d "", wtx.GetDepthInMainChain(), wtx.GetBlocksToMaturity(), wtx.GetCredit());
}
if (block.IsProofOfStake() && mapWallet.count(block.vtx[1].GetHash()))
{
CWalletTx& wtx = mapWallet[block.vtx[1].GetHash()];
- printf(" stake: %d %d %"PRI64d"", wtx.GetDepthInMainChain(), wtx.GetBlocksToMaturity(), wtx.GetCredit());
+ printf(" stake: %d %d %" PRI64d "", wtx.GetDepthInMainChain(), wtx.GetBlocksToMaturity(), wtx.GetCredit());
}
}
walletdb.WritePool(nIndex, CKeyPool(GenerateNewKey()));
setKeyPool.insert(nIndex);
}
- printf("CWallet::NewKeyPool wrote %"PRI64d" new keys\n", nKeys);
+ printf("CWallet::NewKeyPool wrote %" PRI64d " new keys\n", nKeys);
}
return true;
}
if (!walletdb.WritePool(nEnd, CKeyPool(GenerateNewKey())))
throw runtime_error("TopUpKeyPool() : writing generated key failed");
setKeyPool.insert(nEnd);
- printf("keypool added key %"PRI64d", size=%"PRIszu"\n", nEnd, setKeyPool.size());
+ printf("keypool added key %" PRI64d ", size=%" PRIszu "\n", nEnd, setKeyPool.size());
}
}
return true;
throw runtime_error("ReserveKeyFromKeyPool() : unknown key in key pool");
assert(keypool.vchPubKey.IsValid());
if (fDebug && GetBoolArg("-printkeypool"))
- printf("keypool reserve %"PRI64d"\n", nIndex);
+ printf("keypool reserve %" PRI64d "\n", nIndex);
}
}
walletdb.ErasePool(nIndex);
}
if(fDebug)
- printf("keypool keep %"PRI64d"\n", nIndex);
+ printf("keypool keep %" PRI64d "\n", nIndex);
}
void CWallet::ReturnKey(int64 nIndex)
setKeyPool.insert(nIndex);
}
if(fDebug)
- printf("keypool return %"PRI64d"\n", nIndex);
+ printf("keypool return %" PRI64d "\n", nIndex);
}
bool CWallet::GetKeyFromPool(CPubKey& result, bool fAllowReuse)