use local for store_id in write_accounts_to_storage (#30500)

This commit is contained in:
Jeff Washington (jwash) 2023-02-24 13:50:57 -06:00 committed by GitHub
parent 510be7bdb5
commit 9080b36192
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 1 deletions

View File

@ -6204,12 +6204,13 @@ impl AccountsDb {
continue;
}
let store_id = storage.append_vec_id();
for (i, offsets) in rvs.unwrap().windows(2).enumerate() {
let stored_size = offsets[1] - offsets[0];
storage.add_account(stored_size);
infos.push(AccountInfo::new(
StorageLocation::AppendVec(storage.append_vec_id(), offsets[0]),
StorageLocation::AppendVec(store_id, offsets[0]),
accounts_and_meta_to_store
.account(i)
.map(|account| account.lamports())