pull append_vec_id() out of loop (#20713)
This commit is contained in:
committed by
GitHub
parent
00b9056004
commit
1e064c32e2
@ -2509,10 +2509,11 @@ impl AccountsDb {
|
|||||||
for store in stores {
|
for store in stores {
|
||||||
let mut start = 0;
|
let mut start = 0;
|
||||||
original_bytes += store.total_bytes();
|
original_bytes += store.total_bytes();
|
||||||
|
let store_id = store.append_vec_id();
|
||||||
while let Some((account, next)) = store.accounts.get_account(start) {
|
while let Some((account, next)) = store.accounts.get_account(start) {
|
||||||
let new_entry = FoundStoredAccount {
|
let new_entry = FoundStoredAccount {
|
||||||
account,
|
account,
|
||||||
store_id: store.append_vec_id(),
|
store_id,
|
||||||
account_size: next - start,
|
account_size: next - start,
|
||||||
};
|
};
|
||||||
match stored_accounts.entry(new_entry.account.meta.pubkey) {
|
match stored_accounts.entry(new_entry.account.meta.pubkey) {
|
||||||
|
Reference in New Issue
Block a user