Fix - Superfluous `if` condition for overwriting `environments` in feature activation code (#33138)
Removes the `if` block around the overwriting of the `environments`.
This commit is contained in:
parent
9ab5c34543
commit
e9542200e8
|
@ -8086,23 +8086,15 @@ impl Bank {
|
||||||
)
|
)
|
||||||
.unwrap();
|
.unwrap();
|
||||||
let mut loaded_programs_cache = self.loaded_programs_cache.write().unwrap();
|
let mut loaded_programs_cache = self.loaded_programs_cache.write().unwrap();
|
||||||
if *loaded_programs_cache.environments.program_runtime_v1
|
|
||||||
!= program_runtime_environment_v1
|
|
||||||
{
|
|
||||||
loaded_programs_cache.environments.program_runtime_v1 =
|
loaded_programs_cache.environments.program_runtime_v1 =
|
||||||
Arc::new(program_runtime_environment_v1);
|
Arc::new(program_runtime_environment_v1);
|
||||||
}
|
|
||||||
let program_runtime_environment_v2 =
|
let program_runtime_environment_v2 =
|
||||||
solana_loader_v4_program::create_program_runtime_environment_v2(
|
solana_loader_v4_program::create_program_runtime_environment_v2(
|
||||||
&self.runtime_config.compute_budget.unwrap_or_default(),
|
&self.runtime_config.compute_budget.unwrap_or_default(),
|
||||||
false, /* debugging_features */
|
false, /* debugging_features */
|
||||||
);
|
);
|
||||||
if *loaded_programs_cache.environments.program_runtime_v2
|
|
||||||
!= program_runtime_environment_v2
|
|
||||||
{
|
|
||||||
loaded_programs_cache.environments.program_runtime_v2 =
|
loaded_programs_cache.environments.program_runtime_v2 =
|
||||||
Arc::new(program_runtime_environment_v2);
|
Arc::new(program_runtime_environment_v2);
|
||||||
}
|
|
||||||
loaded_programs_cache.prune_feature_set_transition();
|
loaded_programs_cache.prune_feature_set_transition();
|
||||||
}
|
}
|
||||||
for builtin in BUILTINS.iter() {
|
for builtin in BUILTINS.iter() {
|
||||||
|
|
Loading…
Reference in New Issue