瀏覽代碼

Remove unused pub functions in accounts-db (#8507)

Kamil Skalski 1 月之前
父節點
當前提交
7c5e42cf68

+ 0 - 4
accounts-db/src/accounts_cache.rs

@@ -245,10 +245,6 @@ impl AccountsCache {
         }
     }
 
-    pub fn contains_any_slots(&self, max_slot_inclusive: Slot) -> bool {
-        self.cache.iter().any(|e| e.key() <= &max_slot_inclusive)
-    }
-
     pub fn cached_frozen_slots(&self) -> Vec<Slot> {
         self.cache
             .iter()

+ 0 - 8
accounts-db/src/accounts_index.rs

@@ -1708,14 +1708,6 @@ impl<T: IndexValue, U: DiskIndexValue + From<T> + Into<T>> AccountsIndex<T, U> {
         stats.roots_range = Some(roots_tracker.alive_roots.range_width());
     }
 
-    pub fn min_alive_root(&self) -> Option<Slot> {
-        self.roots_tracker.read().unwrap().min_alive_root()
-    }
-
-    pub fn num_alive_roots(&self) -> usize {
-        self.roots_tracker.read().unwrap().alive_roots.len()
-    }
-
     pub fn all_alive_roots(&self) -> Vec<Slot> {
         let tracker = self.roots_tracker.read().unwrap();
         tracker.alive_roots.get_all()

+ 1 - 5
accounts-db/src/accounts_index/roots_tracker.rs

@@ -1,4 +1,4 @@
-use {crate::rolling_bit_field::RollingBitField, solana_clock::Slot};
+use crate::rolling_bit_field::RollingBitField;
 
 #[derive(Debug)]
 pub struct RootsTracker {
@@ -24,8 +24,4 @@ impl RootsTracker {
             alive_roots: RollingBitField::new(max_width),
         }
     }
-
-    pub fn min_alive_root(&self) -> Option<Slot> {
-        self.alive_roots.min()
-    }
 }