Skip to content
This repository has been archived by the owner on Feb 21, 2024. It is now read-only.

Commit

Permalink
find_by_range uses peek instead of get (paritytech#193)
Browse files Browse the repository at this point in the history
* find_by_range uses peek instead of get
  • Loading branch information
ozgunozerk authored Dec 13, 2021
1 parent 107cddf commit 11cc3fb
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions crates/subspace-farmer/src/commitments.rs
Original file line number Diff line number Diff line change
Expand Up @@ -353,8 +353,8 @@ impl Commitments {
range: u64,
salt: Salt,
) -> Option<(Tag, u64)> {
let mut commitment_databases = self.inner.commitment_databases.try_lock()?;
let db_entry = Arc::clone(commitment_databases.databases.get(&salt)?);
let commitment_databases = self.inner.commitment_databases.try_lock()?;
let db_entry = Arc::clone(commitment_databases.databases.peek(&salt)?);

let db_guard = db_entry.db.try_lock()?;
let db = db_guard.clone()?;
Expand Down

0 comments on commit 11cc3fb

Please sign in to comment.