Skip to content

Commit

Permalink
Uses real stored count in tests (solana-labs#2945)
Browse files Browse the repository at this point in the history
  • Loading branch information
brooksprumo authored Sep 18, 2024
1 parent a196285 commit 18f68ff
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions accounts-db/src/accounts_db.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9932,7 +9932,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 @@ -10772,8 +10772,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 @@ -10786,8 +10786,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

0 comments on commit 18f68ff

Please sign in to comment.