AcctIdx: accessors for age (#20023)

This commit is contained in:
Jeff Washington (jwash) 2021-09-21 08:41:17 -05:00 committed by GitHub
parent c3679ab9bd
commit fb71e80962
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 8 additions and 0 deletions

View File

@ -174,6 +174,14 @@ impl<T: IndexValue> AccountMapEntryInner<T> {
pub fn set_dirty(&self, value: bool) -> bool {
self.meta.dirty.swap(value, Ordering::Relaxed)
}
pub fn age(&self) -> Age {
self.meta.age.load(Ordering::Relaxed)
}
pub fn set_age(&self, value: Age) {
self.meta.age.store(value, Ordering::Relaxed)
}
}
pub enum AccountIndexGetResult<'a, T: IndexValue> {