This incentivies constructing `KeychainTxOutIndex` from a changeset
before inserting descriptors (to make use of the spk cache).
/// Methods that are *re-exposed* from the internal [`SpkTxOutIndex`].
impl<K: Clone + Ord + Debug> KeychainTxOutIndex<K> {
+ /// Construct `KeychainTxOutIndex<K>` from the given `changeset`.
+ pub fn from_changeset(changeset: ChangeSet) -> Self {
+ let mut out = Self::default();
+ out.apply_changeset(changeset);
+ out
+ }
+
/// Get the set of indexed outpoints, corresponding to tracked keychains.
pub fn outpoints(&self) -> &BTreeSet<KeychainIndexed<K, OutPoint>> {
self.inner.outpoints()