Skip to content

Implement generics for CheckPoint, LocalChain, and spk_client types #1937

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

Open
LagginTimes opened this issue Dec 4, 2024 · 3 comments
Open
Assignees
Labels
new feature New feature or request

Comments

@LagginTimes
Copy link
Contributor

Currently, the CheckPoint, LocalChain, and spk_client components are not designed to handle generic types, which limits their flexibility. To support caching of Merkle proofs (#1699) and median time passed calculations, it would be beneficial for these components to accept a generic type, specifically to accommodate Headers.

@evanlinjin
Copy link
Member

I'm rooting for this change. Being able to have CheckPoint<Header> means we can guarantee that we have a Header per checkpoint.

Currently, bdk_electrum_c (the streaming Electrum BDK chain source I'm working on) requires some complexity in the Headers struct to ensure we get the right headers per block.

@notmandatory notmandatory transferred this issue from bitcoindevkit/bdk Apr 7, 2025
@luisschwab
Copy link
Contributor

@notmandatory this belongs on bdk I believe?

@notmandatory
Copy link
Member

Thanks @luisschwab moved back.

@notmandatory notmandatory transferred this issue from bitcoindevkit/bdk_wallet Apr 9, 2025
@notmandatory notmandatory removed this from BDK Wallet Apr 9, 2025
@notmandatory notmandatory moved this to Discussion in BDK Chain Apr 23, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
new feature New feature or request
Projects
Status: Discussion
Development

No branches or pull requests

4 participants