diff options
| author | Jeff Garzik <[email protected]> | 2014-08-06 23:58:19 -0400 |
|---|---|---|
| committer | Jeff Garzik <[email protected]> | 2014-08-14 12:34:38 -0400 |
| commit | 6f2c26a457d279138d23d0f321edf55cd6b1f72f (patch) | |
| tree | ce209c55c8ede839f538481135bf6949523db5cc /src/txmempool.h | |
| parent | Merge pull request #4659 (diff) | |
| download | discoin-6f2c26a457d279138d23d0f321edf55cd6b1f72f.tar.xz discoin-6f2c26a457d279138d23d0f321edf55cd6b1f72f.zip | |
Closely track mempool byte total. Add "getmempoolinfo" RPC.
Goal: Gain live insight into the mempool. Groundwork for future work
that caps mempool size.
Diffstat (limited to 'src/txmempool.h')
| -rw-r--r-- | src/txmempool.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/txmempool.h b/src/txmempool.h index 41b2c52f3..2577397bc 100644 --- a/src/txmempool.h +++ b/src/txmempool.h @@ -68,6 +68,7 @@ private: CMinerPolicyEstimator* minerPolicyEstimator; CFeeRate minRelayFee; // Passed to constructor to avoid dependency on main + uint64_t totalTxSize; // sum of all mempool tx' byte sizes public: mutable CCriticalSection cs; @@ -108,6 +109,11 @@ public: LOCK(cs); return mapTx.size(); } + uint64_t GetTotalTxSize() + { + LOCK(cs); + return totalTxSize; + } bool exists(uint256 hash) { |