From 375d1b55561700579858f6657b905a152161b829 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alexander=20Mei=C3=9Fner?= Date: Tue, 7 Sep 2021 10:44:25 +0200 Subject: [PATCH] Removes create_pre_accounts() from InstructionProcessor, as it is already in MessageProcessor. --- program-runtime/src/instruction_processor.rs | 22 -------------------- 1 file changed, 22 deletions(-) diff --git a/program-runtime/src/instruction_processor.rs b/program-runtime/src/instruction_processor.rs index 53bdd13738c422..42fb4b87df1b70 100644 --- a/program-runtime/src/instruction_processor.rs +++ b/program-runtime/src/instruction_processor.rs @@ -663,28 +663,6 @@ impl InstructionProcessor { } } - /// Record the initial state of the accounts so that they can be compared - /// after the instruction is processed - pub fn create_pre_accounts( - message: &Message, - instruction: &CompiledInstruction, - accounts: &[(Pubkey, Rc>)], - ) -> Vec { - let mut pre_accounts = Vec::with_capacity(instruction.accounts.len()); - { - let mut work = |_unique_index: usize, account_index: usize| { - if account_index < message.account_keys.len() && account_index < accounts.len() { - let account = accounts[account_index].1.borrow(); - pre_accounts.push(PreAccount::new(&accounts[account_index].0, &account)); - return Ok(()); - } - Err(InstructionError::MissingAccount) - }; - let _ = instruction.visit_each_account(&mut work); - } - pre_accounts - } - /// Verify the results of a cross-program instruction #[allow(clippy::too_many_arguments)] pub fn verify_and_update(