bdk icon indicating copy to clipboard operation
bdk copied to clipboard

Implement generics for `CheckPoint`, `LocalChain`, and `spk_client` types

Open LagginTimes opened this issue 1 year ago • 3 comments

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.

LagginTimes avatar Dec 04 '24 09:12 LagginTimes

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.

evanlinjin avatar Dec 17 '24 04:12 evanlinjin

@notmandatory this belongs on bdk I believe?

luisschwab avatar Apr 07 '25 23:04 luisschwab

Thanks @luisschwab moved back.

notmandatory avatar Apr 09 '25 03:04 notmandatory