From eb1905e42940d8d3d52331a05313710eed293d66 Mon Sep 17 00:00:00 2001 From: Jon Cinque Date: Tue, 21 Nov 2023 16:58:34 +0100 Subject: [PATCH] token-2022: Fix test because of blockhash not updating (#5877) --- token/program-2022-test/tests/token_metadata_remove_key.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/token/program-2022-test/tests/token_metadata_remove_key.rs b/token/program-2022-test/tests/token_metadata_remove_key.rs index 8640196df70..4a87dd69b5f 100644 --- a/token/program-2022-test/tests/token_metadata_remove_key.rs +++ b/token/program-2022-test/tests/token_metadata_remove_key.rs @@ -145,7 +145,7 @@ async fn success_remove() { let mut context = test_context.context.lock().await; // refresh blockhash before trying again - context.get_new_latest_blockhash().await.unwrap(); + let blockhash = context.get_new_latest_blockhash().await.unwrap(); let transaction = Transaction::new_signed_with_payer( &[remove_key( &spl_token_2022::id(), @@ -156,7 +156,7 @@ async fn success_remove() { )], Some(&context.payer.pubkey()), &[&context.payer, &update_authority], - context.last_blockhash, + blockhash, ); let error = context .banks_client