Add shrink paths (#14238)

This commit is contained in:
sakridge
2020-12-21 21:33:37 -08:00
committed by GitHub
parent 3316e7166c
commit baa9602411
8 changed files with 132 additions and 21 deletions

View File

@@ -712,6 +712,10 @@ impl<T: 'static + Clone> AccountsIndex<T> {
.contains(&slot)
}
pub fn num_roots(&self) -> usize {
self.roots_tracker.read().unwrap().roots.len()
}
pub fn all_roots(&self) -> Vec<Slot> {
self.roots_tracker
.read()