mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-12-02 00:38:15 +01:00
Merge bitcoin/bitcoin#24408: rpc: add rpc to get mempool txs spending specific prevouts
4185570340Add 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-utACK4185570340vincenzopalazzo: re-ACK4185570340danielabrozzoni: re-tACK4185570340w0xlt: reACK4185570340Tree-SHA512: 206687efb720308b7e0b6cf16dd0a994006c0b5a290c8eb386917a80130973a6356d0d5cae1c63a01bb29e066dd721594969db106cba7249214fcac90d2c3dbc
This commit is contained in:
@@ -329,6 +329,7 @@ BASE_SCRIPTS = [
|
||||
'feature_settings.py',
|
||||
'rpc_getdescriptorinfo.py',
|
||||
'rpc_mempool_entry_fee_fields_deprecation.py',
|
||||
'rpc_mempool_info.py',
|
||||
'rpc_help.py',
|
||||
'feature_dirsymlinks.py',
|
||||
'feature_help.py',
|
||||
|
||||
Reference in New Issue
Block a user