Skip to content

Commit

Permalink
Merge bitcoindevkit#1104: refactor: use set_lookahead in set_lookahea…
Browse files Browse the repository at this point in the history
…d_for_all

e89cf5a refactor: use set_lookahead in set_lookahead_for_all (Vladimir Fomene)

Pull request description:

  ### Description

  Use set_lookahead in set_lookahead_for_all.

  ### Checklists

  #### All Submissions:

  * [x] I've signed all my commits
  * [x] I followed the [contribution guidelines](https://github.com/bitcoindevkit/bdk/blob/master/CONTRIBUTING.md)
  * [x] I ran `cargo fmt` and `cargo clippy` before committing

ACKs for top commit:
  realeinherjar:
    ACK: e89cf5a
  evanlinjin:
    ACK e89cf5a

Tree-SHA512: 02d226be7adcfd5e23ecb9d17539b0e089cb55ddf9c6de980155960f8181f2d3ea3ac9a93b2c1b7e0a8d4e4c821d92f65405852c696c9a367193a42d60c1aac6
  • Loading branch information
evanlinjin committed Oct 7, 2023
2 parents 4ee11aa + e89cf5a commit 4a65a12
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 @@ -167,8 +167,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 4a65a12

Please sign in to comment.