Browse Source

Replaces scan_accounts_stored_meta() in tests (#8688)

Brooks 3 weeks ago
parent
commit
310174a19c
1 changed files with 3 additions and 2 deletions
  1. 3 2
      accounts-db/src/accounts_db/tests.rs

+ 3 - 2
accounts-db/src/accounts_db/tests.rs

@@ -6187,11 +6187,12 @@ pub fn get_account_from_account_from_storage(
 fn populate_index(db: &AccountsDb, slots: Range<Slot>) {
 fn populate_index(db: &AccountsDb, slots: Range<Slot>) {
     slots.into_iter().for_each(|slot| {
     slots.into_iter().for_each(|slot| {
         if let Some(storage) = db.get_storage_for_slot(slot) {
         if let Some(storage) = db.get_storage_for_slot(slot) {
+            let mut reader = append_vec::new_scan_accounts_reader();
             storage
             storage
                 .accounts
                 .accounts
-                .scan_accounts_stored_meta(|account| {
+                .scan_accounts(&mut reader, |offset, account| {
                     let info = AccountInfo::new(
                     let info = AccountInfo::new(
-                        StorageLocation::AppendVec(storage.id(), account.offset()),
+                        StorageLocation::AppendVec(storage.id(), offset),
                         account.is_zero_lamport(),
                         account.is_zero_lamport(),
                     );
                     );
                     db.accounts_index.upsert(
                     db.accounts_index.upsert(