diff --git a/runtime/src/accounts_db.rs b/runtime/src/accounts_db.rs index c84f45501faacf..90f36c147b7fea 100644 --- a/runtime/src/accounts_db.rs +++ b/runtime/src/accounts_db.rs @@ -5541,7 +5541,8 @@ impl AccountsDb { .fetch_add(recycle_stores_write_elapsed.as_us(), Ordering::Relaxed); } - pub fn flush_accounts_cache_slot(&self, slot: Slot) { + #[cfg(test)] + pub(crate) fn flush_accounts_cache_slot_for_tests(&self, slot: Slot) { self.flush_slot_cache(slot); } diff --git a/runtime/src/bank.rs b/runtime/src/bank.rs index 8557b70bd06d30..b7a799e4a8bab3 100644 --- a/runtime/src/bank.rs +++ b/runtime/src/bank.rs @@ -6421,11 +6421,11 @@ impl Bank { } #[cfg(test)] - pub fn flush_accounts_cache_slot(&self) { + pub fn flush_accounts_cache_slot_for_tests(&self) { self.rc .accounts .accounts_db - .flush_accounts_cache_slot(self.slot()) + .flush_accounts_cache_slot_for_tests(self.slot()) } pub fn expire_old_recycle_stores(&self) { @@ -14670,7 +14670,7 @@ pub(crate) mod tests { bank1.deposit(&pubkey0, some_lamports).unwrap(); goto_end_of_slot(Arc::::get_mut(&mut bank1).unwrap()); bank1.freeze(); - bank1.flush_accounts_cache_slot(); + bank1.flush_accounts_cache_slot_for_tests(); bank1.print_accounts_stats();