Skip to content
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
20 changes: 10 additions & 10 deletions accounts-db/src/accounts_index.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2128,12 +2128,12 @@ pub mod tests {

#[test]
fn test_clean_and_unref_rooted_entries_by_bin_with_reclaim() {
let index = AccountsIndex::<bool, bool>::default_for_tests();
let index = AccountsIndex::<u64, u64>::default_for_tests();
let pubkey = solana_pubkey::new_rand();
let slot1 = 0;
let slot2 = 1;
let account_info1 = true;
let account_info2 = false;
let account_info1 = 0;
let account_info2 = 1;

let mut gc = Vec::new();
for (slot, account_info) in [(slot1, account_info1), (slot2, account_info2)] {
Expand Down Expand Up @@ -2400,7 +2400,7 @@ pub mod tests {
test_new_entry_code_paths_helper([1.0, 2.0], true, *is_upsert, use_disk);

// account_info type that is NOT cached
test_new_entry_code_paths_helper([true, false], false, *is_upsert, use_disk);
test_new_entry_code_paths_helper([1, 2], false, *is_upsert, use_disk);
}
}
}
Expand Down Expand Up @@ -2746,7 +2746,7 @@ pub mod tests {
#[test]
fn test_update_last_wins() {
let key = solana_pubkey::new_rand();
let index = AccountsIndex::<bool, bool>::default_for_tests();
let index = AccountsIndex::<u64, u64>::default_for_tests();
let ancestors = vec![(0, 0)].into_iter().collect();
let mut gc = Vec::new();
index.upsert(
Expand All @@ -2755,7 +2755,7 @@ pub mod tests {
&key,
&AccountSharedData::default(),
&AccountSecondaryIndexes::default(),
true,
1,
&mut gc,
UPSERT_POPULATE_RECLAIMS,
);
Expand All @@ -2768,7 +2768,7 @@ pub mod tests {
false,
|(slot, account_info)| {
assert_eq!(slot, 0);
assert!(account_info);
assert_eq!(account_info, 1);
},
)
.unwrap();
Expand All @@ -2780,11 +2780,11 @@ pub mod tests {
&key,
&AccountSharedData::default(),
&AccountSecondaryIndexes::default(),
false,
0,
&mut gc,
UPSERT_POPULATE_RECLAIMS,
);
assert_eq!(gc, vec![(0, true)]);
assert_eq!(gc, vec![(0, 1)]);
index
.get_with_and_then(
&key,
Expand All @@ -2793,7 +2793,7 @@ pub mod tests {
false,
|(slot, account_info)| {
assert_eq!(slot, 0);
assert!(!account_info);
assert_eq!(account_info, 0);
},
)
.unwrap();
Expand Down
Loading