From: Vladimir Fomene Date: Tue, 29 Aug 2023 18:06:08 +0000 (+0300) Subject: refactor: use set_lookahead in set_lookahead_for_all X-Git-Tag: v1.0.0-alpha.2~5^2 X-Git-Url: http://internal-gitweb-vhost/script/%22https:/database/primitives/encode/struct.Encoder.html?a=commitdiff_plain;h=e89cf5a16a239d51ae9eb1857b55e7178e588b74;p=bdk refactor: use set_lookahead in set_lookahead_for_all --- diff --git a/crates/chain/src/keychain/txout_index.rs b/crates/chain/src/keychain/txout_index.rs index 9b38a7ad..90787653 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); } }