diff options
author | MacroFake <falke.marco@gmail.com> | 2022-05-27 15:15:24 +0200 |
---|---|---|
committer | MacroFake <falke.marco@gmail.com> | 2022-05-27 15:16:00 +0200 |
commit | 3ba6dd6f4bb42bfab48194ce5f44850b0109451a (patch) | |
tree | dcec781d0ee5361e1e1ac802f3e113011dd41a79 /doc | |
parent | 57bf12523cf9d91ffe2a9b8499a5dc58f1be8b29 (diff) | |
parent | 418557034055f740951294e7677ae9fd5149ea9b (diff) |
Merge bitcoin/bitcoin#24408: rpc: add rpc to get mempool txs spending specific prevouts
418557034055f740951294e7677ae9fd5149ea9b Add RPC to get mempool txs spending outputs (t-bast)
Pull request description:
We add an RPC to fetch mempool transactions spending any of the given outpoints.
Without this RPC, application developers need to first call `getrawmempool` which returns a long list of `txid`, then fetch each of these transactions individually (`getrawtransaction`) to check whether they spend the given outpoints, which wastes a lot of bandwidth (in the worst case we need to transfer the whole mempool).
For example in lightning, when we discover that one of our channel funding transactions has been spent, we need to find the spending transaction to claim our outputs from it. We are currently forced to fetch the whole mempool to do the analysis ourselves, which is quite costly.
I believe that this RPC is also generally useful when doing some introspection on your mempool after one of your transactions failed to broadcast, for example when you implement RBF at the application level. Fetching and analyzing the conflicting transaction gives you more information to successfully replace it.
ACKs for top commit:
darosior:
re-utACK 418557034055f740951294e7677ae9fd5149ea9b
vincenzopalazzo:
re-ACK https://github.com/bitcoin/bitcoin/pull/24408/commits/418557034055f740951294e7677ae9fd5149ea9b
danielabrozzoni:
re-tACK 418557034055f740951294e7677ae9fd5149ea9b
w0xlt:
reACK https://github.com/bitcoin/bitcoin/pull/24408/commits/418557034055f740951294e7677ae9fd5149ea9b
Tree-SHA512: 206687efb720308b7e0b6cf16dd0a994006c0b5a290c8eb386917a80130973a6356d0d5cae1c63a01bb29e066dd721594969db106cba7249214fcac90d2c3dbc
Diffstat (limited to 'doc')
-rw-r--r-- | doc/release-notes/release-notes-24408.md | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/doc/release-notes/release-notes-24408.md b/doc/release-notes/release-notes-24408.md new file mode 100644 index 0000000000..1072ec786a --- /dev/null +++ b/doc/release-notes/release-notes-24408.md @@ -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)
\ No newline at end of file |