We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
KeychainTxOutIndex::from_changeset
1 parent d761265 commit 19e3b5dCopy full SHA for 19e3b5d
crates/chain/src/indexer/keychain_txout.rs
@@ -236,6 +236,13 @@ impl<K> KeychainTxOutIndex<K> {
236
237
/// Methods that are *re-exposed* from the internal [`SpkTxOutIndex`].
238
impl<K: Clone + Ord + Debug> KeychainTxOutIndex<K> {
239
+ /// Construct `KeychainTxOutIndex<K>` from the given `changeset`.
240
+ pub fn from_changeset(changeset: ChangeSet) -> Self {
241
+ let mut out = Self::default();
242
+ out.apply_changeset(changeset);
243
+ out
244
+ }
245
+
246
/// Get the set of indexed outpoints, corresponding to tracked keychains.
247
pub fn outpoints(&self) -> &BTreeSet<KeychainIndexed<K, OutPoint>> {
248
self.inner.outpoints()
0 commit comments