Add RPC to get mempool txs spending outputs

We add an RPC to fetch the mempool transactions spending given outpoints.
Without this RPC, application developers would need to first call
`getrawmempool` which returns a long list of `txid`, then fetch each of
these txs individually to check whether they spend the given outpoint(s).

This RPC can later be enriched to also find confirmed transactions instead
of being restricted to mempool transactions.
This commit is contained in:
t-bast
2022-04-25 10:29:25 +02:00
parent 1ad5d5088d
commit 4185570340
7 changed files with 200 additions and 0 deletions

View File

@@ -0,0 +1,5 @@
New RPCs
--------
- A new `gettxspendingprevout` RPC has been added, which scans the mempool to find
transactions spending any of the given outpoints. (#24408)