correctly reserve space for pre_accounts vector (#15378)

This commit is contained in:
Jeff Washington (jwash) 2021-02-18 09:37:24 -06:00 committed by GitHub
parent 3164cb9b19
commit e3006e3b46
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -802,7 +802,7 @@ impl MessageProcessor {
instruction: &CompiledInstruction,
accounts: &[Rc<RefCell<Account>>],
) -> Vec<PreAccount> {
let mut pre_accounts = Vec::with_capacity(accounts.len());
let mut pre_accounts = Vec::with_capacity(instruction.accounts.len());
{
let mut work = |_unique_index: usize, account_index: usize| {
let key = &message.account_keys[account_index];