File tree Expand file tree Collapse file tree 1 file changed +12
-0
lines changed Expand file tree Collapse file tree 1 file changed +12
-0
lines changed Original file line number Diff line number Diff line change @@ -372,6 +372,9 @@ std::string EntryDescriptionString()
372
372
" \" wtxid\" : hash, (string) hash of serialized transaction, including witness data\n "
373
373
" \" depends\" : [ (array) unconfirmed transactions used as inputs for this transaction\n "
374
374
" \" transactionid\" , (string) parent transaction id\n "
375
+ " ... ]\n "
376
+ " \" spentby\" : [ (array) unconfirmed transactions spending outputs from this transaction\n "
377
+ " \" transactionid\" , (string) child transaction id\n "
375
378
" ... ]\n " ;
376
379
}
377
380
@@ -406,6 +409,15 @@ void entryToJSON(UniValue &info, const CTxMemPoolEntry &e)
406
409
}
407
410
408
411
info.pushKV (" depends" , depends);
412
+
413
+ UniValue spent (UniValue::VARR);
414
+ const CTxMemPool::txiter &it = mempool.mapTx .find (tx.GetHash ());
415
+ const CTxMemPool::setEntries &setChildren = mempool.GetMemPoolChildren (it);
416
+ for (const CTxMemPool::txiter &childiter : setChildren) {
417
+ spent.push_back (childiter->GetTx ().GetHash ().ToString ());
418
+ }
419
+
420
+ info.pushKV (" spentby" , spent);
409
421
}
410
422
411
423
UniValue mempoolToJSON (bool fVerbose )
You can’t perform that action at this time.
0 commit comments