• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

bitcoindevkit / bdk / 38205279101
79%
master: 78%

Build:
Build:
LAST BUILD BRANCH: release/chain-0.23.x
DEFAULT BRANCH: master
Ran 12 Oct 2026 04:52AM UTC
Jobs 1
Files 27
Run time 1min
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

12 Oct 2026 04:48AM UTC coverage: 79.227% (+0.09%) from 79.137%
38205279101

push

github

evanlinjin
Merge bitcoindevkit/bdk#2319: fix(electrum): refresh header cache with headers fetched for the chain update

c04f48760 test(electrum): cover tx re-mined at the same height after a reorg (志宇)
68b2b09bd fix(electrum): refresh header cache with headers fetched for the chain update (志宇)
a8a1d0c5e fix(ci): pin `powerfmt` to `0.2.0` for 1.75 (志宇)

Pull request description:

  ### Description

  `block_header_cache` was only written by `batch_fetch_anchors`, so after a reorg it kept the pre-reorg header for that height. A tx re-mined at the same height then hit the anchor cache under the stale block hash, skipped proof validation, and was never re-anchored to the replacement block. This happens even for a 1-block reorg.

  `fetch_tip_and_latest_blocks` now writes the headers it fetches (the chain suffix and the agreement-walk checkpoints) into the header cache.

  ### Notes to the reviewers

  The test covers two cases: syncing right after the reorg (header is in the suffix), and syncing after 20 more blocks (header comes from the agreement walk). Both fail on the base branch. The 20-block case also fails if only the agreement-walk insert is removed.

  Related: #2312. That issue points at `chain_update`, but checkpoints are already corrected by the agreement walk. The stale header cache is what leaves the anchor wrong.

  ### Changelog notice

  - Fixed `bdk_electrum` returning a stale anchor for a transaction re-mined at the same height after a reorg.

  ### 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
  * [x] I've added tests to reproduce the issue which are now passing
  * [ ] I'm linking the issue being fixed by this PR

  🤖 Generated with [Claude Code](https://claude.com/claude-code)

ACK... (continued)

401 of 546 branches covered (73.44%)

Branch coverage included in aggregate %.

18 of 19 new or added lines in 1 file covered. (94.74%)

1 existing line in 1 file now uncovered.

4454 of 5582 relevant lines covered (79.79%)

2111.3 hits per line

Uncovered Changes

Lines Coverage ∆ File
1
71.63
0.42% crates/electrum/src/bdk_electrum_client.rs

Coverage Regressions

Lines Coverage ∆ File
1
71.63
0.42% crates/electrum/src/bdk_electrum_client.rs
Jobs
ID Job ID Ran Files Coverage
1 38205279101.1 12 Oct 2026 04:52AM UTC 27
79.23
GitHub Action Run
Source Files on build 38205279101
  • Tree
  • List 27
  • Changed 2
  • Source Changed 0
  • Coverage Changed 2
Coverage ∆ File Lines Relevant Covered Missed Hits/Line Branch Hits Branch Misses
  • Back to Repo
  • 77b0e741 on github
  • Prev Build on release/chain-0.23.x (#37315143444)
  • Next Build on release/chain-0.23.x (#38207082450)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE TRIAL · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc