mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-12-12 05:34:57 +01:00
[Qt] simple mempool info in debug window
This commit is contained in:
@@ -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());
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user