aboutsummaryrefslogtreecommitdiff
path: root/src/rpcblockchain.cpp
diff options
context:
space:
mode:
authorWladimir J. van der Laan <[email protected]>2015-07-11 15:47:26 +0200
committerWladimir J. van der Laan <[email protected]>2015-07-11 15:47:43 +0200
commit7cdefb927e928780cdbbb3a9b2ffe37716eebae1 (patch)
treeae4a23f0a97c5a6cf8d08896cfc111c9bf6ceb1d /src/rpcblockchain.cpp
parentMerge pull request #6414 (diff)
parentImplement accurate memory accounting for mempool (diff)
downloaddiscoin-7cdefb927e928780cdbbb3a9b2ffe37716eebae1.tar.xz
discoin-7cdefb927e928780cdbbb3a9b2ffe37716eebae1.zip
Merge pull request #6410
5098c47 Implement accurate memory accounting for mempool (Pieter Wuille)
Diffstat (limited to 'src/rpcblockchain.cpp')
-rw-r--r--src/rpcblockchain.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/rpcblockchain.cpp b/src/rpcblockchain.cpp
index 9cdd0770e..c2de6cb24 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;
}