From bba6ea2d6989f8cc59ecc3a7f5ef02cb915792d9 Mon Sep 17 00:00:00 2001 From: Brooks Date: Wed, 8 Nov 2023 16:15:51 -0500 Subject: [PATCH] Returns IntMap from select_candidates_by_total_usage() (#33976) --- accounts-db/src/accounts_db.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/accounts-db/src/accounts_db.rs b/accounts-db/src/accounts_db.rs index 65c6a9a52cb23e..ed0f3e551c66cf 100644 --- a/accounts-db/src/accounts_db.rs +++ b/accounts-db/src/accounts_db.rs @@ -81,7 +81,7 @@ use { serde::{Deserialize, Serialize}, smallvec::SmallVec, solana_measure::{measure::Measure, measure_us}, - solana_nohash_hasher::IntSet, + solana_nohash_hasher::{IntMap, IntSet}, solana_rayon_threadlimit::get_thread_count, solana_sdk::{ account::{Account, AccountSharedData, ReadableAccount, WritableAccount}, @@ -4328,7 +4328,7 @@ impl AccountsDb { shrink_slots: &ShrinkCandidates, shrink_ratio: f64, oldest_non_ancient_slot: Option, - ) -> (HashMap>, ShrinkCandidates) { + ) -> (IntMap>, ShrinkCandidates) { struct StoreUsageInfo { slot: Slot, alive_ratio: f64, @@ -4371,7 +4371,7 @@ impl AccountsDb { // Working from the beginning of store_usage which are the most sparse and see when we can stop // shrinking while still achieving the overall goals. - let mut shrink_slots = HashMap::new(); + let mut shrink_slots = IntMap::default(); let mut shrink_slots_next_batch = ShrinkCandidates::default(); for usage in &store_usage { let store = &usage.store;