DiskIdx: new items are not dirty by default (#23123)

This commit is contained in:
Jeff Washington (jwash)
2022-02-24 10:17:35 -06:00
committed by GitHub
parent a14c7c37ee
commit 017170c99d
2 changed files with 7 additions and 1 deletions

View File

@@ -203,6 +203,12 @@ impl AccountMapEntryMeta {
age: AtomicU8::new(storage.future_age_to_flush()),
}
}
pub fn new_clean<T: IndexValue>(storage: &Arc<BucketMapHolder<T>>) -> Self {
AccountMapEntryMeta {
dirty: AtomicBool::new(false),
age: AtomicU8::new(storage.future_age_to_flush()),
}
}
}
#[derive(Debug, Default)]