Add ref count from storage (#15078)

This commit is contained in:
sakridge
2021-02-04 09:11:05 -08:00
committed by GitHub
parent d87e0c3f1d
commit e5225b7e68
2 changed files with 7 additions and 1 deletions

View File

@@ -78,6 +78,12 @@ pub struct AccountMapEntryInner<T> {
pub slot_list: RwLock<SlotList<T>>,
}
impl<T> AccountMapEntryInner<T> {
pub fn ref_count(&self) -> u64 {
self.ref_count.load(Ordering::Relaxed)
}
}
#[self_referencing]
pub struct ReadAccountMapEntry<T: 'static> {
owned_entry: AccountMapEntry<T>,