Removed unused purged_slots in purge_older_root_entries (#18102)

Removed unused purged_slots in purge_older_root_entries

(cherry picked from commit ccf6b21bf8)
This commit is contained in:
Lijun Wang
2021-06-22 15:27:37 -07:00
committed by Michael Vines
parent c37e481a43
commit 09b009abd9

View File

@ -1504,14 +1504,12 @@ impl<T: 'static + Clone + IsCached + ZeroLamport + std::marker::Sync + std::mark
Self::get_newest_root_in_slot_list(&roots_tracker.roots, slot_list, max_clean_root); Self::get_newest_root_in_slot_list(&roots_tracker.roots, slot_list, max_clean_root);
let max_clean_root = max_clean_root.unwrap_or(roots_tracker.max_root); let max_clean_root = max_clean_root.unwrap_or(roots_tracker.max_root);
let mut purged_slots: HashSet<Slot> = HashSet::new();
slot_list.retain(|(slot, value)| { slot_list.retain(|(slot, value)| {
let should_purge = let should_purge =
Self::can_purge_older_entries(max_clean_root, newest_root_in_slot_list, *slot) Self::can_purge_older_entries(max_clean_root, newest_root_in_slot_list, *slot)
&& !value.is_cached(); && !value.is_cached();
if should_purge { if should_purge {
reclaims.push((*slot, value.clone())); reclaims.push((*slot, value.clone()));
purged_slots.insert(*slot);
} }
!should_purge !should_purge
}); });