AcctIdx: accessors for age (#20023)
This commit is contained in:
committed by
GitHub
parent
c3679ab9bd
commit
fb71e80962
@ -174,6 +174,14 @@ impl<T: IndexValue> AccountMapEntryInner<T> {
|
|||||||
pub fn set_dirty(&self, value: bool) -> bool {
|
pub fn set_dirty(&self, value: bool) -> bool {
|
||||||
self.meta.dirty.swap(value, Ordering::Relaxed)
|
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> {
|
pub enum AccountIndexGetResult<'a, T: IndexValue> {
|
||||||
|
Reference in New Issue
Block a user