pull append_vec_id() out of loop (#20713)

This commit is contained in:
Jeff Washington (jwash) 2021-10-15 10:41:23 -05:00 committed by GitHub
parent 00b9056004
commit 1e064c32e2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 1 deletions

View File

@ -2509,10 +2509,11 @@ impl AccountsDb {
for store in stores {
let mut start = 0;
original_bytes += store.total_bytes();
let store_id = store.append_vec_id();
while let Some((account, next)) = store.accounts.get_account(start) {
let new_entry = FoundStoredAccount {
account,
store_id: store.append_vec_id(),
store_id,
account_size: next - start,
};
match stored_accounts.entry(new_entry.account.meta.pubkey) {