From 060b6cfb7110eeef23f18c37a2f17fefaf1ace19 Mon Sep 17 00:00:00 2001 From: brooks Date: Thu, 17 Oct 2024 15:54:48 -0400 Subject: [PATCH] Fixes spruious failures in test_bank_update_sysvar_account --- runtime/src/bank/tests.rs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/runtime/src/bank/tests.rs b/runtime/src/bank/tests.rs index e699aaae1360a8..2d6f92e2bd4e89 100644 --- a/runtime/src/bank/tests.rs +++ b/runtime/src/bank/tests.rs @@ -3897,7 +3897,11 @@ fn test_bank_update_sysvar_account() { for pass in 0..5 { use sysvar::clock::Clock; - let dummy_clock_id = solana_sdk::pubkey::new_rand(); + // This pubkey was chosen empirically. + // The test requires that the dummy clock id *not* be loaded for rent collection + // (since rent collection will update the rent epoch, thus causing the + // subsequent checks to fail spuriously). + let dummy_clock_id = Pubkey::from_str_const("64jsX5hwtsjsKR7eNcNU4yhgwjuXoU9KR2MpnV47iXXz"); let dummy_rent_epoch = 44; let (mut genesis_config, _mint_keypair) = create_genesis_config(500);