diff options
author | Pieter Wuille <pieter.wuille@gmail.com> | 2015-07-09 13:56:31 -0400 |
---|---|---|
committer | Pieter Wuille <pieter.wuille@gmail.com> | 2015-07-10 10:49:31 -0400 |
commit | 5098c47b2430ded299c21620527ebd0544fe51e2 (patch) | |
tree | 5423630dea9653802744ed2bb997797fc1b6ca96 /src/rpcblockchain.cpp | |
parent | 943b322d5d292707e193f3a9d8e971881540be23 (diff) |
Implement accurate memory accounting for mempool
Diffstat (limited to 'src/rpcblockchain.cpp')
-rw-r--r-- | src/rpcblockchain.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/rpcblockchain.cpp b/src/rpcblockchain.cpp index 9cdd0770e3..c2de6cb244 100644 --- a/src/rpcblockchain.cpp +++ b/src/rpcblockchain.cpp @@ -758,6 +758,7 @@ UniValue getmempoolinfo(const UniValue& params, bool fHelp) "{\n" " \"size\": xxxxx (numeric) Current tx count\n" " \"bytes\": xxxxx (numeric) Sum of all tx sizes\n" + " \"usage\": xxxxx (numeric) Total memory usage for the mempool\n" "}\n" "\nExamples:\n" + HelpExampleCli("getmempoolinfo", "") @@ -767,6 +768,7 @@ UniValue getmempoolinfo(const UniValue& params, bool fHelp) UniValue ret(UniValue::VOBJ); ret.push_back(Pair("size", (int64_t) mempool.size())); ret.push_back(Pair("bytes", (int64_t) mempool.GetTotalTxSize())); + ret.push_back(Pair("usage", (int64_t) mempool.DynamicMemoryUsage())); return ret; } |