]> Untitled Git - bdk/commitdiff
Merge bitcoindevkit/bdk#2011: fix(electrum): fix stale anchor hash on reorg
authormerge-script <hello@evanlinjin.me>
Fri, 29 Aug 2025 00:11:09 +0000 (00:11 +0000)
committermerge-script <hello@evanlinjin.me>
Fri, 29 Aug 2025 00:11:09 +0000 (00:11 +0000)
fdec863ed134f2b94186a3c5d462a5d1e65956ab fix(electrum): fix stale anchor hash on reorg (Wei Chen)

Pull request description:

  ### Description

  Fixes an issue in `batch_fetch_anchors()` in `bdk_electrum` where, if a stale block header was detected and a fresh header was fetched, the confirmation anchor inserted into `anchor_cache` still used the hash from the original stale header instead of the new one.

  ### Changelog notice

  - `batch_fetch_anchors()` no longer uses a potentially stale hash as the anchor.

  ### Checklists

  #### All Submissions:

  * [x] I followed the [contribution guidelines](https://github.com/bitcoindevkit/bdk/blob/master/CONTRIBUTING.md)

  #### 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:
  evanlinjin:
    ACK fdec863ed134f2b94186a3c5d462a5d1e65956ab

Tree-SHA512: be098569d8e038ca65b9c572f92642151679e36ed4138ca89d554c31bd97aaabfcb430ee055939cc37fcccb35a45bb6158a9b303241a6cf410caf7657d33a5f5


Trivial merge