Skip to content

Commit

Permalink
fix extra_inmemory_heights_to_keep after changes
Browse files Browse the repository at this point in the history
  • Loading branch information
ShuoWangNSL committed Nov 19, 2024
1 parent c595c8b commit 6b20ea4
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions rs/state_manager/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2286,8 +2286,9 @@ impl StateManagerImpl {
.chain(latest_manifest_height)
.collect();

let mut extra_inmemory_heights_to_keep = extra_inmemory_heights_to_keep;
extra_inmemory_heights_to_keep.insert(latest_certified_height);
let extra_inmemory_heights_to_keep = std::iter::once(latest_certified_height)
.chain(extra_inmemory_heights_to_keep.iter().copied())
.collect::<BTreeSet<_>>();

// Send object to deallocation thread if it has capacity.
let deallocate = |x| {
Expand Down

0 comments on commit 6b20ea4

Please sign in to comment.