diff --git a/runtime/src/accounts_index.rs b/runtime/src/accounts_index.rs index af4142d070..367236cafb 100644 --- a/runtime/src/accounts_index.rs +++ b/runtime/src/accounts_index.rs @@ -47,7 +47,7 @@ pub type AccountMap = InMemAccountsIndex; type AccountMapEntry = Arc>; -pub trait IsCached: 'static + Clone + Debug + PartialEq + ZeroLamport + Copy { +pub trait IsCached: 'static + Clone + Debug + PartialEq + ZeroLamport + Copy + Default { fn is_cached(&self) -> bool; } @@ -108,13 +108,13 @@ impl AccountSecondaryIndexes { } } -#[derive(Debug)] +#[derive(Debug, Default)] pub struct AccountMapEntryInner { ref_count: AtomicU64, pub slot_list: RwLock>, } -impl AccountMapEntryInner { +impl AccountMapEntryInner { pub fn ref_count(&self) -> RefCount { self.ref_count.load(Ordering::Relaxed) }