minor cleanup (#30181)
This commit is contained in:
parent
70d635127e
commit
5cbd6b3a74
|
@ -206,9 +206,9 @@ impl AncientSlotInfos {
|
||||||
|
|
||||||
impl AccountsDb {
|
impl AccountsDb {
|
||||||
/// calculate all storage info for the storages in slots
|
/// calculate all storage info for the storages in slots
|
||||||
/// prune the ones to ignore given tuning parameters
|
/// Then, apply 'tuning' to filter out slots we do NOT want to combine.
|
||||||
#[allow(dead_code)]
|
#[allow(dead_code)]
|
||||||
fn collect_sort_filter_info(
|
fn collect_sort_filter_ancient_slots(
|
||||||
&self,
|
&self,
|
||||||
slots: Vec<Slot>,
|
slots: Vec<Slot>,
|
||||||
tuning: PackedAncientStorageTuning,
|
tuning: PackedAncientStorageTuning,
|
||||||
|
@ -607,7 +607,7 @@ pub mod tests {
|
||||||
ideal_storage_size: NonZeroU64::new(1).unwrap(),
|
ideal_storage_size: NonZeroU64::new(1).unwrap(),
|
||||||
can_randomly_shrink,
|
can_randomly_shrink,
|
||||||
};
|
};
|
||||||
infos = db.collect_sort_filter_info(vec![slot1], tuning);
|
infos = db.collect_sort_filter_ancient_slots(vec![slot1], tuning);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
assert_eq!(infos.all_infos.len(), 1);
|
assert_eq!(infos.all_infos.len(), 1);
|
||||||
|
@ -764,7 +764,7 @@ pub mod tests {
|
||||||
ideal_storage_size: NonZeroU64::new(1).unwrap(),
|
ideal_storage_size: NonZeroU64::new(1).unwrap(),
|
||||||
can_randomly_shrink,
|
can_randomly_shrink,
|
||||||
};
|
};
|
||||||
db.collect_sort_filter_info(slot_vec.clone(), tuning)
|
db.collect_sort_filter_ancient_slots(slot_vec.clone(), tuning)
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
assert_eq!(infos.all_infos.len(), 1, "method: {method:?}");
|
assert_eq!(infos.all_infos.len(), 1, "method: {method:?}");
|
||||||
|
@ -1056,7 +1056,7 @@ pub mod tests {
|
||||||
can_randomly_shrink,
|
can_randomly_shrink,
|
||||||
};
|
};
|
||||||
// note this can sort infos.all_infos
|
// note this can sort infos.all_infos
|
||||||
db.collect_sort_filter_info(slot_vec.clone(), tuning)
|
db.collect_sort_filter_ancient_slots(slot_vec.clone(), tuning)
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue