Refactor: Remove program_id from process_instruction() (#20540)
* Replaces usage of program_id parameter by invoke_context.get_caller()?. * Removes "pubkey: &Pubkey" parameter from "process_instruction()".
This commit is contained in:
committed by
GitHub
parent
c16510152e
commit
f30f3bddbb
@ -308,7 +308,6 @@ fn verify_rent_exemption(
|
||||
}
|
||||
|
||||
pub fn process_instruction(
|
||||
_program_id: &Pubkey,
|
||||
first_instruction_account: usize,
|
||||
data: &[u8],
|
||||
invoke_context: &mut dyn InvokeContext,
|
||||
@ -428,10 +427,9 @@ mod tests {
|
||||
let mut keyed_accounts = keyed_accounts.to_vec();
|
||||
keyed_accounts.insert(0, (false, false, owner, &processor_account));
|
||||
super::process_instruction(
|
||||
owner,
|
||||
1,
|
||||
instruction_data,
|
||||
&mut MockInvokeContext::new(create_keyed_accounts_unified(&keyed_accounts)),
|
||||
&mut MockInvokeContext::new(owner, create_keyed_accounts_unified(&keyed_accounts)),
|
||||
)
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user