Use RefCount type alias instead of u64 (#26472)

use RefCount type alias instead of u64
This commit is contained in:
HaoranYi 2022-07-08 13:51:16 -05:00 committed by GitHub
parent cdbcf614ca
commit 995756a550
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 3 deletions

View File

@ -240,7 +240,7 @@ impl<T: Clone + Copy> Bucket<T> {
&mut self,
key: &Pubkey,
data: &[T],
ref_count: u64,
ref_count: RefCount,
) -> Result<(), BucketMapError> {
let best_fit_bucket = IndexEntry::data_bucket_from_num_slots(data.len() as u64);
if self.data.get(best_fit_bucket as usize).is_none() {

View File

@ -2204,7 +2204,7 @@ impl AccountsDb {
}
fn calc_delete_dependencies(
purges: &HashMap<Pubkey, (SlotList<AccountInfo>, u64)>,
purges: &HashMap<Pubkey, (SlotList<AccountInfo>, RefCount)>,
store_counts: &mut HashMap<AppendVecId, (usize, HashSet<Pubkey>)>,
) {
// Another pass to check if there are some filtered accounts which
@ -2212,7 +2212,7 @@ impl AccountsDb {
// then increment their storage count.
let mut already_counted = HashSet::new();
for (pubkey, (account_infos, ref_count_from_storage)) in purges.iter() {
let no_delete = if account_infos.len() as u64 != *ref_count_from_storage {
let no_delete = if account_infos.len() as RefCount != *ref_count_from_storage {
debug!(
"calc_delete_dependencies(),
pubkey: {},