remove from_account from stake_instruction (#4502)
This commit is contained in:
@ -444,13 +444,13 @@ impl LocalCluster {
|
||||
.wait_for_balance(&stake_account_pubkey, Some(amount))
|
||||
.expect("get balance");
|
||||
|
||||
let mut transaction = Transaction::new_signed_instructions(
|
||||
&[from_account.as_ref(), &stake_account_keypair],
|
||||
let mut transaction = Transaction::new_signed_with_payer(
|
||||
vec![stake_instruction::delegate_stake(
|
||||
&from_account.pubkey(),
|
||||
&stake_account_pubkey,
|
||||
&vote_account_pubkey,
|
||||
)],
|
||||
Some(&from_account.pubkey()),
|
||||
&[from_account.as_ref(), &stake_account_keypair],
|
||||
client.get_recent_blockhash().unwrap().0,
|
||||
);
|
||||
client
|
||||
|
@ -167,9 +167,10 @@ pub(crate) mod tests {
|
||||
keypairs: &[&T],
|
||||
ixs: Vec<Instruction>,
|
||||
) {
|
||||
bank.process_transaction(&Transaction::new_signed_instructions(
|
||||
keypairs,
|
||||
bank.process_transaction(&Transaction::new_signed_with_payer(
|
||||
ixs,
|
||||
Some(&keypairs[0].pubkey()),
|
||||
keypairs,
|
||||
bank.last_blockhash(),
|
||||
))
|
||||
.unwrap();
|
||||
@ -204,7 +205,6 @@ pub(crate) mod tests {
|
||||
bank,
|
||||
&[from_account, &stake_account_keypair],
|
||||
vec![stake_instruction::delegate_stake(
|
||||
&from_account.pubkey(),
|
||||
&stake_account_pubkey,
|
||||
vote_pubkey,
|
||||
)],
|
||||
|
Reference in New Issue
Block a user