aboutsummaryrefslogtreecommitdiff
path: root/src/rpc
diff options
context:
space:
mode:
authorSuhas Daftuar <sdaftuar@gmail.com>2016-05-17 08:42:35 -0400
committerSuhas Daftuar <sdaftuar@gmail.com>2016-06-09 09:56:27 -0400
commit7f6eda80438be452a0b6e079737fb6fe00bb26b7 (patch)
tree35256e688f7ce8ca08534f86cfbaf02838b6ca2c /src/rpc
parenta9b8390222a19496922c05d0c3f31bd6f75e1ac6 (diff)
Add ancestor statistics to mempool entry RPC output
Diffstat (limited to 'src/rpc')
-rw-r--r--src/rpc/blockchain.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/rpc/blockchain.cpp b/src/rpc/blockchain.cpp
index 6a07bb8c4e..1bb365d36c 100644
--- a/src/rpc/blockchain.cpp
+++ b/src/rpc/blockchain.cpp
@@ -195,6 +195,9 @@ std::string EntryDescriptionString()
" \"descendantcount\" : n, (numeric) number of in-mempool descendant transactions (including this one)\n"
" \"descendantsize\" : n, (numeric) size of in-mempool descendants (including this one)\n"
" \"descendantfees\" : n, (numeric) modified fees (see above) of in-mempool descendants (including this one)\n"
+ " \"ancestorcount\" : n, (numeric) number of in-mempool ancestor transactions (including this one)\n"
+ " \"ancestorsize\" : n, (numeric) size of in-mempool ancestors (including this one)\n"
+ " \"ancestorfees\" : n, (numeric) modified fees (see above) of in-mempool ancestors (including this one)\n"
" \"depends\" : [ (array) unconfirmed transactions used as inputs for this transaction\n"
" \"transactionid\", (string) parent transaction id\n"
" ... ]\n";
@@ -214,6 +217,9 @@ void entryToJSON(UniValue &info, const CTxMemPoolEntry &e)
info.push_back(Pair("descendantcount", e.GetCountWithDescendants()));
info.push_back(Pair("descendantsize", e.GetSizeWithDescendants()));
info.push_back(Pair("descendantfees", e.GetModFeesWithDescendants()));
+ info.push_back(Pair("ancestorcount", e.GetCountWithAncestors()));
+ info.push_back(Pair("ancestorsize", e.GetSizeWithAncestors()));
+ info.push_back(Pair("ancestorfees", e.GetModFeesWithAncestors()));
const CTransaction& tx = e.GetTx();
set<string> setDepends;
BOOST_FOREACH(const CTxIn& txin, tx.vin)