clean:clone uncleaned_roots for loop (#20714)

This commit is contained in:
Jeff Washington (jwash)
2021-10-15 13:18:00 -05:00
committed by GitHub
parent 9543fd9cdd
commit 6d7da6dbee
2 changed files with 6 additions and 1 deletions

View File

@@ -1865,6 +1865,10 @@ impl<T: IndexValue> AccountsIndex<T> {
self.roots_tracker.write().unwrap().roots.clear()
}
pub fn clone_uncleaned_roots(&self) -> HashSet<Slot> {
self.roots_tracker.read().unwrap().uncleaned_roots.clone()
}
pub fn uncleaned_roots_len(&self) -> usize {
self.roots_tracker.read().unwrap().uncleaned_roots.len()
}