mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-12-12 13:43:43 +01:00
Merge pull request #2924 from sje397/TrafficGraph
[QT] Add network traffic graph to debug window
This commit is contained in:
@@ -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 (chainActive.Tip())
|
||||
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user