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

bitcoindevkit / bdk / 24875540857 / 1
78%
master: 78%

Build:
DEFAULT BRANCH: master
Ran 24 Apr 2026 06:27AM UTC
Files 29
Run time 1s
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

24 Apr 2026 06:23AM UTC coverage: 77.856% (+0.03%) from 77.824%
24875540857.1

push

github

evanlinjin
Merge bitcoindevkit/bdk#2167: fix(bitcoind_rpc): emit invalidated heights when start_height is above agreement point

<a class=hub.com/bitcoindevkit/bdk/commit/76b653007d63803a33668dcd51f23085b71c3911">76b653007 fix(bitcoind_rpc): emit invalidated heights when start_height is above agreement point (志宇)

Pull request description:

  ### Description

  When a reorg drops the agreement point below `start_height`, the emitter would skip directly to `start_height`, producing a checkpoint that could not connect with the caller's local chain (`CannotConnectError`).

  This affects callers that create a new `Emitter` on each sync with `start_height = tip_height` — a common pattern.

  **Fix:** Override `start_height` to the agreement height when a reorg is detected (agreement point below both `start_height` and `last_cp`), so the emitter revisits the invalidated block heights.

  Context: https://discord.com/channels/753336465005608961/753367451319926827/1489544612094808235

  cc @stevenroose

  ### Notes to the reviewers

  The key change is in `poll()` in `crates/bitcoind_rpc/src/lib.rs`: when `AgreementFound` is handled and the agreement point is below both `start_height` and `last_cp.height()`, we lower `start_height` to the agreement height. This ensures the emitter emits the invalidated blocks instead of skipping over them.

  ### Changelog notice

  ```md
  Fixed:
  - `Emitter` producing un-connectable checkpoints when `start_height` is above the agreement point 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
  * [x] I'm linking the issue being fixed by this PR

ACKs for top commit:
  luisschwab:
    ACK 76b653007d63803a33668dcd51f23085b71c3911

Tree-SHA512: ec9c382e80f33f79f4d... (continued)

418 of 554 branches covered (75.45%)

Branch coverage included in aggregate %.

4441 of 5687 relevant lines covered (78.09%)

3520.58 hits per line

Source Files on job 24875540857.1
  • Tree
  • List 29
  • Changed 1
  • Source Changed 0
  • Coverage Changed 1
Coverage ∆ File Lines Relevant Covered Missed Hits/Line Branch Hits Branch Misses
  • Back to Build 24875540857
  • 646661fa on github
  • Prev Job for on master (#24875436711.1)
  • Next Job for on master (#25104402953.1)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc