Skip to content

Commit

Permalink
remove test method slot_stores (solana-labs#29736)
Browse files Browse the repository at this point in the history
  • Loading branch information
jeffwashington authored Jan 17, 2023
1 parent 71a746f commit e1d38c8
Showing 1 changed file with 4 additions and 8 deletions.
12 changes: 4 additions & 8 deletions runtime/src/accounts_db.rs
Original file line number Diff line number Diff line change
Expand Up @@ -13684,10 +13684,6 @@ pub mod tests {
}
}

fn slot_stores(db: &AccountsDb, slot: Slot) -> Vec<SnapshotStorageOne> {
db.get_storages_for_slot(slot).unwrap_or_default()
}

#[test]
fn test_read_only_accounts_cache() {
let db = Arc::new(AccountsDb::new_with_config_for_tests(
Expand Down Expand Up @@ -14605,8 +14601,8 @@ pub mod tests {

db.print_accounts_stats("post-clean1");
// Check stores > 0
assert!(!slot_stores(&db, 0).is_empty());
assert!(!slot_stores(&db, 1).is_empty());
assert!(!db.storage.is_empty_entry(0));
assert!(!db.storage.is_empty_entry(1));

// root slot 0
db.add_root_and_flush_write_cache(0);
Expand Down Expand Up @@ -14636,8 +14632,8 @@ pub mod tests {

db.print_accounts_stats("post-clean4");

assert!(slot_stores(&db, 0).is_empty());
assert!(!slot_stores(&db, 1).is_empty());
assert!(db.storage.is_empty_entry(0));
assert!(!db.storage.is_empty_entry(1));
}

#[test]
Expand Down

0 comments on commit e1d38c8

Please sign in to comment.