Skip to content
This repository has been archived by the owner on Jan 22, 2025. It is now read-only.

add slot to assert message #34225

Merged
merged 1 commit into from
Nov 28, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 12 additions & 3 deletions accounts-db/src/account_storage.rs
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,10 @@ impl AccountStorage {
/// return the append vec for 'slot' if it exists
/// This is only ever called when shrink is not possibly running and there is a max of 1 append vec per slot.
pub fn get_slot_storage_entry(&self, slot: Slot) -> Option<Arc<AccountStorageEntry>> {
assert!(self.no_shrink_in_progress());
assert!(
self.no_shrink_in_progress(),
"self.no_shrink_in_progress(): {slot}"
);
self.get_slot_storage_entry_shrinking_in_progress_ok(slot)
}

Expand All @@ -95,7 +98,10 @@ impl AccountStorage {
/// returns true if there is no entry for 'slot'
#[cfg(test)]
pub(crate) fn is_empty_entry(&self, slot: Slot) -> bool {
assert!(self.no_shrink_in_progress());
assert!(
self.no_shrink_in_progress(),
"self.no_shrink_in_progress(): {slot}"
);
self.map.get(&slot).is_none()
}

Expand Down Expand Up @@ -124,7 +130,10 @@ impl AccountStorage {
}

pub(crate) fn insert(&self, slot: Slot, store: Arc<AccountStorageEntry>) {
assert!(self.no_shrink_in_progress());
assert!(
self.no_shrink_in_progress(),
"self.no_shrink_in_progress(): {slot}"
);
assert!(self
.map
.insert(
Expand Down