diff options
author | Jonas Schnelli <dev@jonasschnelli.ch> | 2015-11-09 11:45:07 +0100 |
---|---|---|
committer | Jonas Schnelli <dev@jonasschnelli.ch> | 2015-11-20 08:40:43 +0100 |
commit | c197798d1b7364e8225beaaa716399441288203e (patch) | |
tree | 56a9c09e5a07ce31295486c7411b56ddcebe4a39 /src/qt/clientmodel.cpp | |
parent | 6176e9bf3d553862c67720d218a30553d771aa63 (diff) |
[Qt] simple mempool info in debug window
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 0900a35cc4..566e8fa62d 100644 --- a/src/qt/clientmodel.cpp +++ b/src/qt/clientmodel.cpp @@ -13,6 +13,7 @@ #include "checkpoints.h" #include "clientversion.h" #include "net.h" +#include "txmempool.h" #include "ui_interface.h" #include "util.h" @@ -88,6 +89,16 @@ QDateTime ClientModel::getLastBlockDate() const return QDateTime::fromTime_t(Params().GenesisBlock().GetBlockTime()); // Genesis block's time of current network } +long ClientModel::getMempoolSize() const +{ + return mempool.size(); +} + +size_t ClientModel::getMempoolDynamicUsage() const +{ + return mempool.DynamicMemoryUsage(); +} + double ClientModel::getVerificationProgress() const { LOCK(cs_main); @@ -122,6 +133,7 @@ void ClientModel::updateTimer() Q_EMIT numBlocksChanged(newNumBlocks, newBlockDate); } + Q_EMIT mempoolSizeChanged(getMempoolSize(), getMempoolDynamicUsage()); Q_EMIT bytesChanged(getTotalBytesRecv(), getTotalBytesSent()); } |