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/clientmodel.h | |
| 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/clientmodel.h')
| -rw-r--r-- | src/qt/clientmodel.h | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/src/qt/clientmodel.h b/src/qt/clientmodel.h index ca735f14c..f29b695ea 100644 --- a/src/qt/clientmodel.h +++ b/src/qt/clientmodel.h @@ -25,6 +25,13 @@ enum BlockSource { BLOCK_SOURCE_NETWORK }; +enum NumConnections { + CONNECTIONS_NONE = 0, + CONNECTIONS_IN = (1U << 0), + CONNECTIONS_OUT = (1U << 1), + CONNECTIONS_ALL = (CONNECTIONS_IN | CONNECTIONS_OUT), +}; + /** Model for Bitcoin network client. */ class ClientModel : public QObject { @@ -36,7 +43,8 @@ public: OptionsModel *getOptionsModel(); - int getNumConnections() const; + //! Return number of connections, default is in- and outbound (total) + int getNumConnections(unsigned int flags = CONNECTIONS_ALL) const; int getNumBlocks() const; int getNumBlocksAtStartup(); |