aboutsummaryrefslogtreecommitdiff
path: root/src/qt/clientmodel.cpp
diff options
context:
space:
mode:
authorWladimir J. van der Laan <laanwj@gmail.com>2013-10-15 03:48:22 -0700
committerWladimir J. van der Laan <laanwj@gmail.com>2013-10-15 03:48:22 -0700
commitf0c25cf6ecb226d2a82d04d73af44ca6bc0f3efa (patch)
tree0883a42d7dda4a59858d62c8b03b6f019f3c7d8c /src/qt/clientmodel.cpp
parent6fb27534eb98f8d4bc17d0fdea98c7a25d04f887 (diff)
parentce14345a89dfa05992f8d2c7c9fe36315d4a67e6 (diff)
downloadbitcoin-f0c25cf6ecb226d2a82d04d73af44ca6bc0f3efa.tar.xz
Merge pull request #2924 from sje397/TrafficGraph
[QT] Add network traffic graph to debug window
Diffstat (limited to 'src/qt/clientmodel.cpp')
-rw-r--r--src/qt/clientmodel.cpp12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/qt/clientmodel.cpp b/src/qt/clientmodel.cpp
index af96f11bf2..2bab488135 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 (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)