Skip to content

Fix potentially wrong logic if bdk_electrum is used with other chain sources #1956

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

evanlinjin
Copy link
Member

Description

bdk_electrum may have incorrect reorg-resolution (resulting in inconsistent chain state) if it is paired with other chain sources which do not batch-fetch latest blocks.

Also refactored the chain-updating logic to be more understandable.

Notes to the reviewers

This is still WIP. Needs tests, better documentation and PR description.

Changelog notice

Checklists

All Submissions:

  • I've signed all my commits
  • I followed the contribution guidelines
  • I ran cargo fmt and cargo clippy before committing

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

@evanlinjin evanlinjin self-assigned this May 14, 2025
@evanlinjin evanlinjin added the bug Something isn't working label May 14, 2025
@evanlinjin evanlinjin moved this to In Progress in BDK Chain May 14, 2025
@evanlinjin evanlinjin changed the title Fix otentially wrong logic if used with other chain sources Fix potentially wrong logic if bdk_electrum is used with other chain sources May 14, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
Status: In Progress
Development

Successfully merging this pull request may close these issues.

1 participant