Skip to content

Commit

Permalink
TODO and a comment
Browse files Browse the repository at this point in the history
  • Loading branch information
nazar-pc committed Jul 29, 2024
1 parent 6c98cf6 commit 9cc17ea
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions crates/subspace-farmer/src/farmer_cache.rs
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,8 @@ where
Some(free_offset)
}
None => {
// Sort piece caches by number of stored pieces to fill those that are less
// populated first
let mut sorted_backends = self
.backends
.iter_mut()
Expand Down Expand Up @@ -426,6 +428,8 @@ where
.insert(RecordKey::from(piece_index.to_multihash()), offset);
}
None => {
// TODO: Optimize to not store all free offsets, only dangling
// offsets are actually necessary
cache_free_offsets.push(offset);
}
}
Expand Down

0 comments on commit 9cc17ea

Please sign in to comment.