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.
1 parent 9efaead commit 21d8875Copy full SHA for 21d8875
crates/chain/src/keychain/txout_index.rs
@@ -206,9 +206,11 @@ impl<K: Clone + Ord + Debug> KeychainTxOutIndex<K> {
206
fn next_store_index(&self, keychain: &K) -> u32 {
207
self.inner()
208
.all_spks()
209
+ // This range is filtering out the spks with a keychain different than
210
+ // `keychain`. We don't use filter here as range is more optimized.
211
.range((keychain.clone(), u32::MIN)..(keychain.clone(), u32::MAX))
212
.last()
- .map_or(0, |((_, v), _)| *v + 1)
213
+ .map_or(0, |((_, index), _)| *index + 1)
214
}
215
216
/// Generates script pubkey iterators for every `keychain`. The iterators iterate over all
0 commit comments