Deprecate Instruction::new (#15695)
This commit is contained in:
@ -22,7 +22,7 @@ fn invoker_process_instruction(
|
||||
let account_info_iter = &mut accounts.iter();
|
||||
let invoked_program_info = next_account_info(account_info_iter)?;
|
||||
invoke(
|
||||
&Instruction::new(*invoked_program_info.key, &[0], vec![]),
|
||||
&Instruction::new_with_bincode(*invoked_program_info.key, &[0], vec![]),
|
||||
&[invoked_program_info.clone()],
|
||||
)?;
|
||||
msg!("Processing invoker instruction after CPI");
|
||||
@ -58,7 +58,7 @@ async fn cpi() {
|
||||
);
|
||||
|
||||
let mut test_state = program_test.start_with_context().await;
|
||||
let instructions = vec![Instruction::new(
|
||||
let instructions = vec![Instruction::new_with_bincode(
|
||||
invoker_program_id,
|
||||
&[0],
|
||||
vec![AccountMeta::new_readonly(invoked_program_id, false)],
|
||||
|
@ -92,7 +92,7 @@ async fn run_fuzz_instructions(
|
||||
program_id,
|
||||
);
|
||||
instructions.push(instruction);
|
||||
instructions.push(Instruction::new(*program_id, &[0], vec![]));
|
||||
instructions.push(Instruction::new_with_bincode(*program_id, &[0], vec![]));
|
||||
signer_keypairs.push(keypair);
|
||||
}
|
||||
// Process transaction on test network
|
||||
|
@ -58,7 +58,7 @@ async fn clock_sysvar_updated_from_warp() {
|
||||
|
||||
let mut context = program_test.start_with_context().await;
|
||||
let expected_slot = 5_000_000;
|
||||
let instruction = Instruction::new(
|
||||
let instruction = Instruction::new_with_bincode(
|
||||
program_id,
|
||||
&expected_slot,
|
||||
vec![AccountMeta::new_readonly(clock::id(), false)],
|
||||
@ -83,7 +83,7 @@ async fn clock_sysvar_updated_from_warp() {
|
||||
|
||||
// Warp to success!
|
||||
context.warp_to_slot(expected_slot).unwrap();
|
||||
let instruction = Instruction::new(
|
||||
let instruction = Instruction::new_with_bincode(
|
||||
program_id,
|
||||
&expected_slot,
|
||||
vec![AccountMeta::new_readonly(clock::id(), false)],
|
||||
|
Reference in New Issue
Block a user