diff options
| author | Philip Kaufmann <[email protected]> | 2014-02-16 19:48:27 +0100 |
|---|---|---|
| committer | Philip Kaufmann <[email protected]> | 2014-03-03 22:35:02 +0100 |
| commit | 8e296230775deade9c63f48e61a1ccc9c7e3f4da (patch) | |
| tree | 854545f3e8777abc8383f0b1a1c6b52a10d62f7e /src/qt/rpcconsole.cpp | |
| parent | doc: Empty release notes for next release (diff) | |
| download | discoin-8e296230775deade9c63f48e61a1ccc9c7e3f4da.tar.xz discoin-8e296230775deade9c63f48e61a1ccc9c7e3f4da.zip | |
[Qt] show number of in/out connections in debug console
Diffstat (limited to 'src/qt/rpcconsole.cpp')
| -rw-r--r-- | src/qt/rpcconsole.cpp | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/src/qt/rpcconsole.cpp b/src/qt/rpcconsole.cpp index bd29efee8..cb5991adf 100644 --- a/src/qt/rpcconsole.cpp +++ b/src/qt/rpcconsole.cpp @@ -349,7 +349,14 @@ void RPCConsole::message(int category, const QString &message, bool html) void RPCConsole::setNumConnections(int count) { - ui->numberOfConnections->setText(QString::number(count)); + if (!clientModel) + return; + + QString connections = QString::number(count) + " ("; + connections += tr("In:") + " " + QString::number(clientModel->getNumConnections(CONNECTIONS_IN)) + " / "; + connections += tr("Out:") + " " + QString::number(clientModel->getNumConnections(CONNECTIONS_OUT)) + ")"; + + ui->numberOfConnections->setText(connections); } void RPCConsole::setNumBlocks(int count, int countOfPeers) |