Skip to content

Commit 7f6eda8

Browse files
committed
Add ancestor statistics to mempool entry RPC output
1 parent a9b8390 commit 7f6eda8

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

src/rpc/blockchain.cpp

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -195,6 +195,9 @@ std::string EntryDescriptionString()
195195
" \"descendantcount\" : n, (numeric) number of in-mempool descendant transactions (including this one)\n"
196196
" \"descendantsize\" : n, (numeric) size of in-mempool descendants (including this one)\n"
197197
" \"descendantfees\" : n, (numeric) modified fees (see above) of in-mempool descendants (including this one)\n"
198+
" \"ancestorcount\" : n, (numeric) number of in-mempool ancestor transactions (including this one)\n"
199+
" \"ancestorsize\" : n, (numeric) size of in-mempool ancestors (including this one)\n"
200+
" \"ancestorfees\" : n, (numeric) modified fees (see above) of in-mempool ancestors (including this one)\n"
198201
" \"depends\" : [ (array) unconfirmed transactions used as inputs for this transaction\n"
199202
" \"transactionid\", (string) parent transaction id\n"
200203
" ... ]\n";
@@ -214,6 +217,9 @@ void entryToJSON(UniValue &info, const CTxMemPoolEntry &e)
214217
info.push_back(Pair("descendantcount", e.GetCountWithDescendants()));
215218
info.push_back(Pair("descendantsize", e.GetSizeWithDescendants()));
216219
info.push_back(Pair("descendantfees", e.GetModFeesWithDescendants()));
220+
info.push_back(Pair("ancestorcount", e.GetCountWithAncestors()));
221+
info.push_back(Pair("ancestorsize", e.GetSizeWithAncestors()));
222+
info.push_back(Pair("ancestorfees", e.GetModFeesWithAncestors()));
217223
const CTransaction& tx = e.GetTx();
218224
set<string> setDepends;
219225
BOOST_FOREACH(const CTxIn& txin, tx.vin)

0 commit comments

Comments
 (0)