Skip to content

Commit 7e5d596

Browse files
committed
RPC: add wtxid to mempool entry output
1 parent d81dccf commit 7e5d596

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/rpc/blockchain.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -343,6 +343,7 @@ std::string EntryDescriptionString()
343343
" \"ancestorcount\" : n, (numeric) number of in-mempool ancestor transactions (including this one)\n"
344344
" \"ancestorsize\" : n, (numeric) virtual transaction size of in-mempool ancestors (including this one)\n"
345345
" \"ancestorfees\" : n, (numeric) modified fees (see above) of in-mempool ancestors (including this one)\n"
346+
" \"wtxid\" : hash, (string) hash of serialized transaction, including witness data\n"
346347
" \"depends\" : [ (array) unconfirmed transactions used as inputs for this transaction\n"
347348
" \"transactionid\", (string) parent transaction id\n"
348349
" ... ]\n";
@@ -363,6 +364,7 @@ void entryToJSON(UniValue &info, const CTxMemPoolEntry &e)
363364
info.push_back(Pair("ancestorcount", e.GetCountWithAncestors()));
364365
info.push_back(Pair("ancestorsize", e.GetSizeWithAncestors()));
365366
info.push_back(Pair("ancestorfees", e.GetModFeesWithAncestors()));
367+
info.push_back(Pair("wtxid", mempool.vTxHashes[e.vTxHashesIdx].first.ToString()));
366368
const CTransaction& tx = e.GetTx();
367369
std::set<std::string> setDepends;
368370
for (const CTxIn& txin : tx.vin)

0 commit comments

Comments
 (0)