Switch to Instruction::new_with_bincode
This commit is contained in:
parent
82a385b7c3
commit
c63d854ac7
|
@ -33,7 +33,7 @@ async fn test_cross_program_invocation() {
|
|||
let (mut banks_client, payer, recent_blockhash) = program_test.start().await;
|
||||
|
||||
let mut transaction = Transaction::new_with_payer(
|
||||
&[Instruction::new(
|
||||
&[Instruction::new_with_bincode(
|
||||
program_id,
|
||||
&[bump_seed],
|
||||
vec![
|
||||
|
|
|
@ -15,7 +15,7 @@ async fn test_custom_heap() {
|
|||
.start()
|
||||
.await;
|
||||
let mut transaction = Transaction::new_with_payer(
|
||||
&[Instruction::new(
|
||||
&[Instruction::new_with_bincode(
|
||||
program_id,
|
||||
&[10_u8, 11, 12, 13, 14],
|
||||
vec![],
|
||||
|
|
|
@ -18,7 +18,7 @@ async fn test_logging() {
|
|||
.start()
|
||||
.await;
|
||||
let mut transaction = Transaction::new_with_payer(
|
||||
&[Instruction::new(
|
||||
&[Instruction::new_with_bincode(
|
||||
program_id,
|
||||
&[10_u8, 11, 12, 13, 14],
|
||||
vec![AccountMeta::new(Pubkey::new_unique(), false)],
|
||||
|
|
|
@ -20,7 +20,7 @@ async fn test_sysvar() {
|
|||
.await;
|
||||
|
||||
let mut transaction = Transaction::new_with_payer(
|
||||
&[Instruction::new(
|
||||
&[Instruction::new_with_bincode(
|
||||
program_id,
|
||||
&(),
|
||||
vec![
|
||||
|
|
|
@ -35,7 +35,7 @@ async fn test_lamport_transfer() {
|
|||
let (mut banks_client, payer, recent_blockhash) = program_test.start().await;
|
||||
|
||||
let mut transaction = Transaction::new_with_payer(
|
||||
&[Instruction::new(
|
||||
&[Instruction::new_with_bincode(
|
||||
program_id,
|
||||
&(),
|
||||
vec![
|
||||
|
|
|
@ -406,7 +406,7 @@ pub fn split_only(
|
|||
AccountMeta::new_readonly(*authorized_pubkey, true),
|
||||
];
|
||||
|
||||
Instruction::new(id(), &StakeInstruction::Split(lamports), account_metas)
|
||||
Instruction::new_with_bincode(id(), &StakeInstruction::Split(lamports), account_metas)
|
||||
}
|
||||
|
||||
/// FIXME copied from the stake program
|
||||
|
@ -422,7 +422,7 @@ pub fn authorize(
|
|||
AccountMeta::new_readonly(*authorized_pubkey, true),
|
||||
];
|
||||
|
||||
Instruction::new(
|
||||
Instruction::new_with_bincode(
|
||||
id(),
|
||||
&StakeInstruction::Authorize(*new_authorized_pubkey, stake_authorize),
|
||||
account_metas,
|
||||
|
@ -443,7 +443,7 @@ pub fn merge(
|
|||
AccountMeta::new_readonly(*authorized_pubkey, true),
|
||||
];
|
||||
|
||||
Instruction::new(id(), &StakeInstruction::Merge, account_metas)
|
||||
Instruction::new_with_bincode(id(), &StakeInstruction::Merge, account_metas)
|
||||
}
|
||||
|
||||
/// FIXME copied from the stake program
|
||||
|
@ -468,7 +468,7 @@ pub fn create_account(
|
|||
|
||||
/// FIXME copied from the stake program
|
||||
pub fn initialize(stake_pubkey: &Pubkey, authorized: &Authorized, lockup: &Lockup) -> Instruction {
|
||||
Instruction::new(
|
||||
Instruction::new_with_bincode(
|
||||
id(),
|
||||
&StakeInstruction::Initialize(*authorized, *lockup),
|
||||
vec![
|
||||
|
@ -492,5 +492,5 @@ pub fn delegate_stake(
|
|||
AccountMeta::new_readonly(Pubkey::from_str(STAKE_CONFIG).unwrap(), false),
|
||||
AccountMeta::new_readonly(*authorized_pubkey, true),
|
||||
];
|
||||
Instruction::new(id(), &StakeInstruction::DelegateStake, account_metas)
|
||||
Instruction::new_with_bincode(id(), &StakeInstruction::DelegateStake, account_metas)
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue