LLFourn / bdk_core_staging

Staging area for bdk_core initial development
15 stars 12 forks source link

`KeychainTracker` should be `Tracker<T>` #189

Open LLFourn opened 1 year ago

LLFourn commented 1 year ago

I think some of what KeychainTracker does could be generalized to a Tracker<T> where for KeychainTracker T would be KeychainTxOutIndex. We could then also have Tracker<SpkTxOutIndex> too for when you don't have a keychain (but still want to automatically scan after each new tx in chain).

Maybe from there we could try to do Tracker<SilentPaymentTxOutIndex> etc. So the notion of a Tracker<T> is something that has an internal ChainGraph and updates the txout index whenever anything gets inserted.

This will require quite a bit of design work by whoever takes this issue. It will probably need a trait (:fearful:) TxOutIndex to constrain T.