From e89cf5a16a239d51ae9eb1857b55e7178e588b74 Mon Sep 17 00:00:00 2001 From: Vladimir Fomene Date: Tue, 29 Aug 2023 21:06:08 +0300 Subject: [PATCH] refactor: use set_lookahead in set_lookahead_for_all --- crates/chain/src/keychain/txout_index.rs | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/crates/chain/src/keychain/txout_index.rs b/crates/chain/src/keychain/txout_index.rs index 9b38a7ade..907876534 100644 --- a/crates/chain/src/keychain/txout_index.rs +++ b/crates/chain/src/keychain/txout_index.rs @@ -192,8 +192,7 @@ impl KeychainTxOutIndex { /// [`set_lookahead`]: Self::set_lookahead pub fn set_lookahead_for_all(&mut self, lookahead: u32) { for keychain in &self.keychains.keys().cloned().collect::>() { - self.lookahead.insert(keychain.clone(), lookahead); - self.replenish_lookahead(keychain); + self.set_lookahead(keychain, lookahead); } }