diff options
| author | Scott Ellis <[email protected]> | 2013-08-23 02:09:32 +1000 |
|---|---|---|
| committer | Scott Ellis <[email protected]> | 2013-10-14 19:02:03 +1100 |
| commit | ce14345a89dfa05992f8d2c7c9fe36315d4a67e6 (patch) | |
| tree | 997e08222a82558e8720fa0ce0ba82438f161664 /src/qt/clientmodel.cpp | |
| parent | Merge pull request #2937 (diff) | |
| download | discoin-ce14345a89dfa05992f8d2c7c9fe36315d4a67e6.tar.xz discoin-ce14345a89dfa05992f8d2c7c9fe36315d4a67e6.zip | |
Add network traffic graph
Diffstat (limited to 'src/qt/clientmodel.cpp')
| -rw-r--r-- | src/qt/clientmodel.cpp | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/qt/clientmodel.cpp b/src/qt/clientmodel.cpp index b33f534f7..f0cf229b3 100644 --- a/src/qt/clientmodel.cpp +++ b/src/qt/clientmodel.cpp @@ -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) |