Skip to content

Commit

Permalink
Adjusts test_feature_activation_loaded_programs_recompilation_phase().
Browse files Browse the repository at this point in the history
  • Loading branch information
Lichtso committed Oct 27, 2023
1 parent e9da2d4 commit 1bad18d
Showing 1 changed file with 3 additions and 17 deletions.
20 changes: 3 additions & 17 deletions runtime/src/bank/tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,7 @@ use {
*,
},
crate::{
accounts_background_service::{
AbsRequestSender, PrunedBanksRequestHandler, SendDroppedBankCallback,
},
accounts_background_service::{PrunedBanksRequestHandler, SendDroppedBankCallback},
bank::replace_account::{
replace_empty_account_with_upgradeable_program,
replace_non_upgradeable_program_account, ReplaceAccountError,
Expand Down Expand Up @@ -12510,7 +12508,7 @@ fn test_is_in_slot_hashes_history() {
}

#[test]
fn test_runtime_feature_enable_with_program_cache() {
fn test_feature_activation_loaded_programs_recompilation_phase() {
solana_logger::setup();

// Bank Setup
Expand Down Expand Up @@ -12576,20 +12574,8 @@ fn test_runtime_feature_enable_with_program_cache() {
&feature::create_account(&Feature { activated_at: None }, feature_account_balance),
);

// Reroot to call LoadedPrograms::prune() and end the current recompilation phase
goto_end_of_slot(bank.clone());
bank_forks
.write()
.unwrap()
.insert(Arc::into_inner(bank).unwrap());
let bank = bank_forks.read().unwrap().working_bank();
bank_forks.read().unwrap().prune_program_cache(bank.slot);
bank_forks
.write()
.unwrap()
.set_root(bank.slot, &AbsRequestSender::default(), None);

// Advance to next epoch, which starts the next recompilation phase
// Advance to next epoch, which starts the recompilation phase
let bank = new_from_parent_next_epoch(bank, 1);

// Execute after feature is enabled to check it was filtered out and reverified.
Expand Down

0 comments on commit 1bad18d

Please sign in to comment.