File tree Expand file tree Collapse file tree 1 file changed +11
-5
lines changed
crates/chain/src/keychain Expand file tree Collapse file tree 1 file changed +11
-5
lines changed Original file line number Diff line number Diff line change @@ -168,11 +168,17 @@ const DEFAULT_LOOKAHEAD: u32 = 25;
168
168
/// this is useful in case a user unassigns a keychain from a descriptor and after some time
169
169
/// assigns it again.
170
170
///
171
- /// Additionally, although a keychain can only be assigned to one descriptor, different keychains
172
- /// can be assigned to the same descriptor. When a method returns spks/outpoints that is associated
173
- /// with a descriptor, it may be associated with multiple keychain variants. The keychain variant
174
- /// with the higher rank will be returned. Rank is determined by the [`Ord`] implementation of the
175
- /// keychain type. Earlier keychain variants have higher rank.
171
+ /// # Different keychains assigned to one descriptor
172
+ ///
173
+ /// Although a keychain can only be assigned to one descriptor, different keychains
174
+ /// can be assigned to the same descriptor. This is not recommended.
175
+ ///
176
+ /// If multiple keycahins are assigned to the same descriptor:
177
+ /// 1. Methods that take in a keychain, such as [`KeychainTxOutIndex::reveal_next_spk`],
178
+ /// will work normally when either keychain is passed in.
179
+ /// 2. Methods that return a keychain, such as [`KeychainTxOutIndex::outpoints`] will
180
+ /// return only the keychain variant with the highest rank.
181
+ /// Rank is determined by the [`Ord`] implementation of the keychain type.
176
182
///
177
183
/// [`Ord`]: core::cmp::Ord
178
184
/// [`SpkTxOutIndex`]: crate::spk_txout_index::SpkTxOutIndex
You can’t perform that action at this time.
0 commit comments