Changeset View
Changeset View
Standalone View
Standalone View
src/qt/clientmodel.cpp
Show First 20 Lines • Show All 91 Lines • ▼ Show 20 Lines | QDateTime ClientModel::getLastBlockDate() const { | ||||
if (chainActive.Tip()) | if (chainActive.Tip()) | ||||
return QDateTime::fromTime_t(chainActive.Tip()->GetBlockTime()); | return QDateTime::fromTime_t(chainActive.Tip()->GetBlockTime()); | ||||
// Genesis block's time of current network | // Genesis block's time of current network | ||||
return QDateTime::fromTime_t(Params().GenesisBlock().GetBlockTime()); | return QDateTime::fromTime_t(Params().GenesisBlock().GetBlockTime()); | ||||
} | } | ||||
long ClientModel::getMempoolSize() const { | long ClientModel::getMempoolSize() const { | ||||
return mempool.size(); | return g_mempool.size(); | ||||
} | } | ||||
size_t ClientModel::getMempoolDynamicUsage() const { | size_t ClientModel::getMempoolDynamicUsage() const { | ||||
return mempool.DynamicMemoryUsage(); | return g_mempool.DynamicMemoryUsage(); | ||||
} | } | ||||
double ClientModel::getVerificationProgress(const CBlockIndex *tipIn) const { | double ClientModel::getVerificationProgress(const CBlockIndex *tipIn) const { | ||||
CBlockIndex *tip = const_cast<CBlockIndex *>(tipIn); | CBlockIndex *tip = const_cast<CBlockIndex *>(tipIn); | ||||
if (!tip) { | if (!tip) { | ||||
LOCK(cs_main); | LOCK(cs_main); | ||||
tip = chainActive.Tip(); | tip = chainActive.Tip(); | ||||
} | } | ||||
▲ Show 20 Lines • Show All 183 Lines • Show Last 20 Lines |