Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Uses real stored count in tests #2945

Merged
merged 1 commit into from
Sep 18, 2024
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
10 changes: 5 additions & 5 deletions accounts-db/src/accounts_db.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9935,7 +9935,7 @@ pub mod tests {
assert_eq!(append_vec.alive_bytes(), expected_alive_bytes);
}
// total # accounts in append vec
assert_eq!(append_vec.approx_stored_count(), 2);
assert_eq!(append_vec.accounts_count(), 2);
// # alive accounts
assert_eq!(append_vec.count(), 1);
// all account data alive
Expand Down Expand Up @@ -10775,8 +10775,8 @@ pub mod tests {
let slot_1_store = &db.storage.get_slot_storage_entry(1).unwrap();
assert_eq!(slot_0_store.count(), 2);
assert_eq!(slot_1_store.count(), 2);
assert_eq!(slot_0_store.approx_stored_count(), 2);
assert_eq!(slot_1_store.approx_stored_count(), 2);
assert_eq!(slot_0_store.accounts_count(), 2);
assert_eq!(slot_1_store.accounts_count(), 2);
}

// overwrite old rooted account version; only the r_slot_0_stores.count() should be
Expand All @@ -10789,8 +10789,8 @@ pub mod tests {
let slot_1_store = &db.storage.get_slot_storage_entry(1).unwrap();
assert_eq!(slot_0_store.count(), 1);
assert_eq!(slot_1_store.count(), 2);
assert_eq!(slot_0_store.approx_stored_count(), 2);
assert_eq!(slot_1_store.approx_stored_count(), 2);
assert_eq!(slot_0_store.accounts_count(), 2);
assert_eq!(slot_1_store.accounts_count(), 2);
}
});

Expand Down
Loading