From: merge-script Date: Fri, 20 Mar 2026 01:01:20 +0000 (-0300) Subject: Merge bitcoindevkit/bdk#2104: fix(esplora): deduplicate missing txids in fetch_txs_wi... X-Git-Url: http://internal-gitweb-vhost/parse/src/example_cli/%22https:/encode/magical/static/git-logo.png?a=commitdiff_plain;p=bdk Merge bitcoindevkit/bdk#2104: fix(esplora): deduplicate missing txids in fetch_txs_with_outpoints 3b6b3ba710492056677349686568f2b2f6c23ee7 fix(esplora): deduplicate missing txids in fetch_txs_with_outpoints (phrwlk) Pull request description: ### Description Previously `fetch_txs_with_outpoints` collected spend txids into a Vec, so the same txid could be pushed multiple times when one transaction spent several input outpoints. This caused redundant `get_tx_info` calls to Esplora for the same transaction, wasting network and CPU without changing the resulting `TxUpdate`. Use `HashSet` for `missing_txs` in both async and blocking `fetch_txs_with_outpoints,` so each txid is only requested once while keeping the observable behaviour of `SyncResponse` / `TxUpdate` unchanged. ### Changelog notice ``` ### Changed - Use `HashSet` instead of `Vec` to track `missing_txs` in bdk_esplora, it deduplicates txids. ``` ### Checklists #### All Submissions: * [x] I followed the [contribution guidelines](https://github.com/bitcoindevkit/bdk/blob/master/CONTRIBUTING.md) #### New Features: * [ ] I've added tests for the new feature * [ ] I've added docs for the new feature #### Bugfixes: * [ ] This pull request breaks the existing API * [ ] I've added tests to reproduce the issue which are now passing * [ ] I'm linking the issue being fixed by this PR ACKs for top commit: oleonardolima: ACK 3b6b3ba710492056677349686568f2b2f6c23ee7 luisschwab: ACK 3b6b3ba710492056677349686568f2b2f6c23ee7 Tree-SHA512: 9f1c48c8576abef5ac7b4cc5a64ae9238617fb06cd726e37021f9052931454f920aaaa1c7b1d81acfbb5a80cc46c9f39153e086941aacc8fc259c2d74b4c66b9 --- 0f89edb6b1be8d0e554010afa43007ec4a1da623