#include <QDateTime>
#include <QTimer>
+extern double GetPoSKernelPS();
+extern double GetDifficulty(const CBlockIndex* blockindex);
+
static const int64 nClientStartupTime = GetTime();
ClientModel::ClientModel(OptionsModel *optionsModel, QObject *parent) :
unsubscribeFromCoreSignals();
}
+double ClientModel::getPoSKernelPS()
+{
+ return GetPoSKernelPS();
+}
+
+double ClientModel::getDifficulty(bool fProofofStake)
+{
+ if (fProofofStake)
+ return GetDifficulty(GetLastBlockIndex(pindexBest,true));
+ else
+ return GetDifficulty(GetLastBlockIndex(pindexBest,false));
+}
+
int ClientModel::getNumConnections() const
{
return vNodes.size();
return numBlocksAtStartup;
}
+quint64 ClientModel::getTotalBytesRecv() const
+{
+ return CNode::GetTotalBytesRecv();
+}
+
+quint64 ClientModel::getTotalBytesSent() const
+{
+ return CNode::GetTotalBytesSent();
+}
+
QDateTime ClientModel::getLastBlockDate() const
{
if (pindexBest)
emit numBlocksChanged(newNumBlocks, newNumBlocksOfPeers);
}
+
+ emit bytesChanged(getTotalBytesRecv(), getTotalBytesSent());
}
void ClientModel::updateNumConnections(int numConnections)