Skip to content
This repository has been archived by the owner on Jan 10, 2025. It is now read-only.

test: ensure confidential_transfer using the latest blockhash #6836

Merged
merged 1 commit into from
Jun 12, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions token/program-2022-test/tests/confidential_transfer_fee.rs
Original file line number Diff line number Diff line change
Expand Up @@ -867,11 +867,12 @@ async fn confidential_transfer_withdraw_withheld_tokens_from_mint_with_proof_con
instruction_type.encode_verify_proof(Some(context_state_info), &proof_data),
];

let recent_blockhash = ctx.get_new_latest_blockhash().await.unwrap();
let tx = Transaction::new_signed_with_payer(
&instructions,
Some(&ctx.payer.pubkey()),
&[&ctx.payer, &context_state_account],
ctx.last_blockhash,
recent_blockhash,
);
ctx.banks_client.process_transaction(tx).await.unwrap();
}
Expand Down Expand Up @@ -1034,11 +1035,12 @@ async fn confidential_transfer_withdraw_withheld_tokens_from_accounts_with_proof
instruction_type.encode_verify_proof(Some(context_state_info), &proof_data),
];

let recent_blockhash = ctx.get_new_latest_blockhash().await.unwrap();
let tx = Transaction::new_signed_with_payer(
&instructions,
Some(&ctx.payer.pubkey()),
&[&ctx.payer, &context_state_account],
ctx.last_blockhash,
recent_blockhash,
);
ctx.banks_client.process_transaction(tx).await.unwrap();
}
Expand Down
Loading