Skip to content
This repository has been archived by the owner on Jan 13, 2025. It is now read-only.

migrate tests to not use AccountStorage::get #29464

Merged
merged 1 commit into from
Jan 2, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions runtime/src/accounts_db.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10973,7 +10973,7 @@ pub mod tests {
assert!(db.load_without_fixed_root(&ancestors, &key).is_none());
assert!(db.bank_hashes.read().unwrap().get(&unrooted_slot).is_none());
assert!(db.accounts_cache.slot_cache(unrooted_slot).is_none());
assert!(db.storage.get(&unrooted_slot).is_none());
assert!(db.storage.get_slot_stores(unrooted_slot).is_none());
assert!(db.accounts_index.get_account_read_entry(&key).is_none());
assert!(db
.accounts_index
Expand Down Expand Up @@ -11355,8 +11355,9 @@ pub mod tests {
//slot is gone
accounts.print_accounts_stats("pre-clean");
accounts.add_root_and_flush_write_cache(1);
assert!(accounts.storage.get_slot_stores(0).is_some());
accounts.clean_accounts_for_tests();
assert!(accounts.storage.get(&0).is_none());
assert!(accounts.storage.get_slot_stores(0).is_none());

//new value is there
let ancestors = vec![(1, 1)].into_iter().collect();
Expand Down