cleanup get_closeset_completion (#30516)
This commit is contained in:
parent
50f069af43
commit
781a7cbd28
|
@ -117,13 +117,11 @@ pub fn get_closest_completion(
|
||||||
limit: usize,
|
limit: usize,
|
||||||
) -> (Vec<ShredRepairType>, /* processed slots */ usize) {
|
) -> (Vec<ShredRepairType>, /* processed slots */ usize) {
|
||||||
let mut slot_dists: Vec<(Slot, u64)> = Vec::default();
|
let mut slot_dists: Vec<(Slot, u64)> = Vec::default();
|
||||||
let mut explored_slots: HashSet<Slot> = HashSet::default();
|
|
||||||
let iter = GenericTraversal::new(tree);
|
let iter = GenericTraversal::new(tree);
|
||||||
for slot in iter {
|
for slot in iter {
|
||||||
if processed_slots.contains(&slot) || explored_slots.contains(&slot) {
|
if processed_slots.contains(&slot) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
explored_slots.insert(slot);
|
|
||||||
let slot_meta = slot_meta_cache
|
let slot_meta = slot_meta_cache
|
||||||
.entry(slot)
|
.entry(slot)
|
||||||
.or_insert_with(|| blockstore.meta(slot).unwrap());
|
.or_insert_with(|| blockstore.meta(slot).unwrap());
|
||||||
|
|
Loading…
Reference in New Issue