Skip to content

Commit

Permalink
Cleanup: Removes prev_account_sizes from `InvokeContext::native_inv…
Browse files Browse the repository at this point in the history
…oke()` (solana-labs#26582)

Removes prev_account_sizes from InvokeContext::native_invoke().
  • Loading branch information
Lichtso authored Jul 12, 2022
1 parent fd5df1c commit 03738d6
Showing 1 changed file with 0 additions and 12 deletions.
12 changes: 0 additions & 12 deletions program-runtime/src/invoke_context.rs
Original file line number Diff line number Diff line change
Expand Up @@ -655,17 +655,6 @@ impl<'a> InvokeContext<'a> {
) -> Result<(), InstructionError> {
let (instruction_accounts, program_indices) =
self.prepare_instruction(&instruction, signers)?;
let mut prev_account_sizes = Vec::with_capacity(instruction_accounts.len());
for instruction_account in instruction_accounts.iter() {
let account_length = self
.transaction_context
.get_account_at_index(instruction_account.index_in_transaction)?
.borrow()
.data()
.len();
prev_account_sizes.push((instruction_account.index_in_transaction, account_length));
}

let mut compute_units_consumed = 0;
self.process_instruction(
&instruction.data,
Expand All @@ -674,7 +663,6 @@ impl<'a> InvokeContext<'a> {
&mut compute_units_consumed,
&mut ExecuteTimings::default(),
)?;

Ok(())
}

Expand Down

0 comments on commit 03738d6

Please sign in to comment.