Skip to content

Commit

Permalink
Have HotStorageReader::capacity() simply return len()
Browse files Browse the repository at this point in the history
  • Loading branch information
yhchiang-sol committed Mar 23, 2024
1 parent 1ff9615 commit a960163
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions accounts-db/src/tiered_storage/hot.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ use {
mmap_utils::{get_pod, get_slice},
owners::{OwnerOffset, OwnersBlockFormat, OwnersTable, OWNER_NO_OWNER},
StorableAccounts, StorableAccountsWithHashesAndWriteVersions, TieredStorageError,
TieredStorageFormat, TieredStorageResult, MAX_TIERED_STORAGE_FILE_SIZE,
TieredStorageFormat, TieredStorageResult,
},
},
bytemuck::{Pod, Zeroable},
Expand Down Expand Up @@ -370,9 +370,6 @@ impl HotStorageReader {
}

pub fn capacity(&self) -> u64 {
if self.is_empty() {
return MAX_TIERED_STORAGE_FILE_SIZE;
}
self.len() as u64
}

Expand Down

0 comments on commit a960163

Please sign in to comment.