Skip to content

Commit

Permalink
Remove dead methods in accounts_db.rs (solana-labs#3226)
Browse files Browse the repository at this point in the history
  • Loading branch information
ksolana authored Oct 21, 2024
1 parent bf81652 commit 9e102ce
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 14 deletions.
4 changes: 0 additions & 4 deletions accounts-db/src/accounts_cache.rs
Original file line number Diff line number Diff line change
Expand Up @@ -61,10 +61,6 @@ impl SlotCacheInner {
);
}

pub fn get_all_pubkeys(&self) -> Vec<Pubkey> {
self.cache.iter().map(|item| *item.key()).collect()
}

pub fn insert(&self, pubkey: &Pubkey, account: AccountSharedData) -> CachedAccount {
let data_len = account.data().len() as u64;
let item = Arc::new(CachedAccountInner {
Expand Down
10 changes: 0 additions & 10 deletions accounts-db/src/accounts_db.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2072,11 +2072,6 @@ impl AccountsDb {
)
}

pub fn expected_cluster_type(&self) -> ClusterType {
self.cluster_type
.expect("Cluster type must be set at initialization")
}

/// Returns if the experimental accounts lattice hash is enabled
pub fn is_experimental_accumulator_hash_enabled(&self) -> bool {
self.is_experimental_accumulator_hash_enabled
Expand Down Expand Up @@ -6420,11 +6415,6 @@ impl AccountsDb {
);
}

pub fn checked_iterative_sum_for_capitalization(total_cap: u64, new_cap: u64) -> u64 {
let new_total = total_cap as u128 + new_cap as u128;
AccountsHasher::checked_cast_for_capitalization(new_total)
}

pub fn checked_sum_for_capitalization<T: Iterator<Item = u64>>(balances: T) -> u64 {
AccountsHasher::checked_cast_for_capitalization(balances.map(|b| b as u128).sum::<u128>())
}
Expand Down

0 comments on commit 9e102ce

Please sign in to comment.