From 595bba95b44c6d48aead6845bfcf3cb2b9538d43 Mon Sep 17 00:00:00 2001 From: "Jeff Washington (jwash)" <75863576+jeffwashington@users.noreply.github.com> Date: Fri, 10 Sep 2021 18:32:10 -0500 Subject: [PATCH] accounts index traits (#19768) --- runtime/src/accounts_index.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) 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) }