You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
chain: SyncRequestBuilderExt/FullScanRequestBuilderExt only work with BlockHash checkpoint data #2437
Describe the enhancement SyncRequestBuilderExt and FullScanRequestBuilderExt (in bdk_chain::indexer::keychain_txout) are only implemented for builders whose checkpoint data is the default D = BlockHash:
impl<K:Clone + Ord + Debug>SyncRequestBuilderExt<K>forSyncRequestBuilder<(K,u32)>{ .. }impl<K:Clone + Ord + Debug>FullScanRequestBuilderExt<K>forFullScanRequestBuilder<K>{ .. }
SyncRequestBuilder<I, D>, FullScanRequestBuilder<K, D>, CheckPoint<D> and LocalChain<D> are all generic over D, but with any other D (e.g. Header) revealed_spks_from_indexer, unused_spks_from_indexer and spks_from_indexer cannot be called:
let tip = CheckPoint::<Header>::new(0,genesis_block(Network::Regtest).header);let request = SyncRequest::builder_at(0).chain_tip(tip).revealed_spks_from_indexer(&indexer, ..)// error[E0599]: method not found.build();
The impls never use the checkpoint data, so they can be made generic over D.
Use case
Building sync/full-scan requests from a KeychainTxOutIndex for a LocalChain<Header> (or any custom checkpoint data), the same way it already works for LocalChain<BlockHash>. This is the same kind of D restriction that #2416 fixed for SyncResponse::is_empty/FullScanResponse::is_empty.
Impact
Blocking production usage
Nice-to-have / UX improvement
Developer experience / maintainability
Are you using BDK in a production project?
Yes
No
Not yet, but planning to
Which backend(s) are relevant (if any)?
Electrum
Esplora
Bitcoin Core RPC
None / not backend-related (e.g. bdk_chain, bdk_core)
Other (please specify): ____
Project or organization (optional)
Additional context
Fix: add a D type parameter to both impls. Callers using the default D = BlockHash are unaffected.
Activity