]> Untitled Git - bdk/commit
Merge bitcoindevkit/bdk#2104: fix(esplora): deduplicate missing txids in fetch_txs_wi... master github/master
authormerge-script <oleonardolima@users.noreply.github.com>
Fri, 20 Mar 2026 01:01:20 +0000 (22:01 -0300)
committermerge-script <oleonardolima@users.noreply.github.com>
Fri, 20 Mar 2026 01:01:20 +0000 (22:01 -0300)
commit0f89edb6b1be8d0e554010afa43007ec4a1da623
treefc47fc7edf78961f83067abb4ab9b820949b3b4d
parent37ab6705fdb586ee72cf1527b45ae8e74f043734
parent3b6b3ba710492056677349686568f2b2f6c23ee7
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<Txid>` 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