From 1e6e1f567cae0efc9be7cecc852176bdd577f46e Mon Sep 17 00:00:00 2001 From: Brooks Date: Thu, 17 Oct 2024 18:25:31 -0400 Subject: [PATCH] Fixes spurious failures in test_bank_update_sysvar_account (#3209) --- 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);