Skip to content

Commit

Permalink
refactor: use set_lookahead in set_lookahead_for_all
Browse files Browse the repository at this point in the history
  • Loading branch information
vladimirfomene committed Sep 6, 2023
1 parent 2867e88 commit e89cf5a
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions crates/chain/src/keychain/txout_index.rs
Original file line number Diff line number Diff line change
Expand Up @@ -192,8 +192,7 @@ impl<K: Clone + Ord + Debug> KeychainTxOutIndex<K> {
/// [`set_lookahead`]: Self::set_lookahead
pub fn set_lookahead_for_all(&mut self, lookahead: u32) {
for keychain in &self.keychains.keys().cloned().collect::<Vec<_>>() {
self.lookahead.insert(keychain.clone(), lookahead);
self.replenish_lookahead(keychain);
self.set_lookahead(keychain, lookahead);
}
}

Expand Down

0 comments on commit e89cf5a

Please sign in to comment.