Exploration: add custom sync methods#1012
Conversation
| .map(|spk| ((KeychainKind::Internal, i), spk)) | ||
| })); | ||
|
|
||
| let builder = BdkSyncRequest::builder() |
There was a problem hiding this comment.
Could we preserve the expected_spk_txids behavior that BDK Wallet’s normal start_sync_with_revealed_spks{,_at} path adds? Those expected txids are used by sync backends to detect previously-seen mempool txs that disappear from SPK history. As written, this custom SyncRequest builder only sets the chain tip and selected SPKs, so these selective sync APIs can silently miss eviction/replacement updates compared with the existing sync path.
| Arc::new(SyncRequestBuilder(Mutex::new(Some(builder)))) | ||
| } | ||
|
|
||
| /// Create a partial [`SyncRequest`] for a specific set of derivation indices. |
There was a problem hiding this comment.
Since this is a new public FFI API, could we add tests that reveal a known set of external/internal addresses and assert the request contains only the selected indices / last N revealed SPKs? That would also help guard this custom builder against drifting from BDK Wallet’s normal sync-request semantics.
This is WIP, but would basically allow you to sync specific indices on either of your keychains, or say "sync me the last x number of addresses on each keychain".
Description
Notes to the reviewers
Documentation
bdk_walletbitcoinuniffiChangelog
Checklists
All Submissions:
cargo fmtandcargo clippybefore committingchangelog:*labelNew Features:
Bugfixes: