Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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
test: ensure using the latest blockhash to process tx
  • Loading branch information
yihau committed Jun 11, 2024
commit 59ac8cce5b950f9e7d5a67cdef89abaf3d006eee
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