Add network traffic graph

This commit is contained in:
Scott Ellis
2013-08-23 02:09:32 +10:00
parent 9269d0e96e
commit ce14345a89
13 changed files with 618 additions and 9 deletions

View File

@@ -51,6 +51,16 @@ int ClientModel::getNumBlocksAtStartup()
return numBlocksAtStartup;
}
quint64 ClientModel::getTotalBytesRecv() const
{
return CNode::GetTotalBytesRecv();
}
quint64 ClientModel::getTotalBytesSent() const
{
return CNode::GetTotalBytesSent();
}
QDateTime ClientModel::getLastBlockDate() const
{
if (pindexBest)
@@ -85,6 +95,8 @@ void ClientModel::updateTimer()
// ensure we return the maximum of newNumBlocksOfPeers and newNumBlocks to not create weird displays in the GUI
emit numBlocksChanged(newNumBlocks, std::max(newNumBlocksOfPeers, newNumBlocks));
}
emit bytesChanged(getTotalBytesRecv(), getTotalBytesSent());
}
void ClientModel::updateNumConnections(int numConnections)