Skip to content

Commit

Permalink
remove single use AccountStorage.slot_store_count (solana-labs#29479)
Browse files Browse the repository at this point in the history
  • Loading branch information
jeffwashington authored and gnapoli23 committed Jan 10, 2023
1 parent 838129f commit 71431df
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 6 deletions.
5 changes: 0 additions & 5 deletions runtime/src/account_storage.rs
Original file line number Diff line number Diff line change
Expand Up @@ -37,11 +37,6 @@ impl AccountStorage {
.map(|res| res.read().unwrap().values().cloned().collect())
}

pub(crate) fn slot_store_count(&self, slot: Slot, store_id: AppendVecId) -> Option<usize> {
self.get_account_storage_entry(slot, store_id)
.map(|store| store.count())
}

pub(crate) fn all_slots(&self) -> Vec<Slot> {
self.map.iter().map(|iter_item| *iter_item.key()).collect()
}
Expand Down
3 changes: 2 additions & 1 deletion runtime/src/accounts_db.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3219,7 +3219,8 @@ impl AccountsDb {
);
let count = self
.storage
.slot_store_count(*slot, account_info.store_id())
.get_account_storage_entry(*slot, account_info.store_id())
.map(|store| store.count())
.unwrap()
- 1;
debug!(
Expand Down

0 comments on commit 71431df

Please sign in to comment.