]> Untitled Git - bdk/commitdiff
docs(chain): fix docs
author志宇 <hello@evanlinjin.me>
Wed, 12 Jun 2024 13:50:03 +0000 (21:50 +0800)
committer志宇 <hello@evanlinjin.me>
Thu, 13 Jun 2024 14:52:47 +0000 (22:52 +0800)
crates/chain/src/keychain/txout_index.rs

index b8c0c45707e05bb865d7c3e1cb8bf7b34fd08fd5..b43b73769b521c4831d1c279e796528c4d08d8cb 100644 (file)
@@ -29,9 +29,9 @@ pub const DEFAULT_LOOKAHEAD: u32 = 25;
 /// and only one descriptor and each descriptor has one and only one keychain. The
 /// [`insert_descriptor`] method will return an error if you try and violate this invariant. This
 /// rule is a proxy for a stronger rule: no two descriptors should produce the same script pubkey.
-/// Having two descriptors produce the same script pubkey should cause whichever keychain derives the
-/// script pubkey first to be the effective owner of it but you should not rely on this behaviour.
-/// ⚠ It is up you, the developer, not to violate this invariant.
+/// Having two descriptors produce the same script pubkey should cause whichever keychain derives
+/// the script pubkey first to be the effective owner of it but you should not rely on this
+/// behaviour. ⚠ It is up you, the developer, not to violate this invariant.
 ///
 /// # Revealed script pubkeys
 ///
@@ -341,7 +341,7 @@ impl<K: Clone + Ord + Debug> KeychainTxOutIndex<K> {
 }
 
 impl<K: Clone + Ord + Debug> KeychainTxOutIndex<K> {
-    /// Return the map of the keychain to descriptors.
+    /// Return all keychains and their corresponding descriptors.
     pub fn keychains(
         &self,
     ) -> impl DoubleEndedIterator<Item = (&K, &Descriptor<DescriptorPublicKey>)> + ExactSizeIterator + '_