Skip to content

Commit

Permalink
simple refactorings to disk idx (#27238)
Browse files Browse the repository at this point in the history
  • Loading branch information
jeffwashington authored Aug 19, 2022
1 parent 6f045d6 commit 2031e0a
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
3 changes: 2 additions & 1 deletion runtime/src/accounts_index.rs
Original file line number Diff line number Diff line change
Expand Up @@ -412,7 +412,8 @@ impl<T: IndexValue> PreAllocatedAccountMapEntry<T> {
account_info: T,
storage: &Arc<BucketMapHolder<T>>,
) -> AccountMapEntry<T> {
let ref_count = if account_info.is_cached() { 0 } else { 1 };
let is_cached = account_info.is_cached();
let ref_count = if is_cached { 0 } else { 1 };
let meta = AccountMapEntryMeta::new_dirty(storage);
Arc::new(AccountMapEntryInner::new(
vec![(slot, account_info)],
Expand Down
1 change: 1 addition & 0 deletions runtime/src/bucket_map_holder.rs
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ pub struct BucketMapHolder<T: IndexValue> {
pub disk: Option<BucketMap<(Slot, T)>>,

pub count_buckets_flushed: AtomicUsize,
/// rolling 'current' age
pub age: AtomicU8,
pub stats: BucketMapHolderStats,

Expand Down

0 comments on commit 2031e0a

Please sign in to comment.