cache executors on failed transactions (#22308)

This commit is contained in:
Jack May
2022-01-05 22:09:03 -08:00
committed by GitHub
parent 37ebd9bd9e
commit 12e160269e
3 changed files with 85 additions and 49 deletions

View File

@ -510,7 +510,7 @@ fn process_loader_upgradeable_instruction(
use_jit,
true,
)?;
invoke_context.add_executor(&new_program_id, executor);
invoke_context.update_executor(&new_program_id, executor);
let keyed_accounts = invoke_context.get_keyed_accounts()?;
let payer = keyed_account_at_index(keyed_accounts, first_instruction_account)?;
@ -658,7 +658,7 @@ fn process_loader_upgradeable_instruction(
use_jit,
true,
)?;
invoke_context.add_executor(&new_program_id, executor);
invoke_context.update_executor(&new_program_id, executor);
let keyed_accounts = invoke_context.get_keyed_accounts()?;
let programdata = keyed_account_at_index(keyed_accounts, first_instruction_account)?;
@ -925,7 +925,7 @@ fn process_loader_instruction(
create_executor(first_instruction_account, 0, invoke_context, use_jit, true)?;
let keyed_accounts = invoke_context.get_keyed_accounts()?;
let program = keyed_account_at_index(keyed_accounts, first_instruction_account)?;
invoke_context.add_executor(program.unsigned_key(), executor);
invoke_context.update_executor(program.unsigned_key(), executor);
program.try_account_ref_mut()?.set_executable(true);
ic_msg!(
invoke_context,