diff --git a/crates/sui-core/src/authority/epoch_start_configuration.rs b/crates/sui-core/src/authority/epoch_start_configuration.rs index 59c445f57218d..5ebe7b9043f89 100644 --- a/crates/sui-core/src/authority/epoch_start_configuration.rs +++ b/crates/sui-core/src/authority/epoch_start_configuration.rs @@ -71,19 +71,20 @@ pub enum EpochFlag { impl EpochFlag { pub fn default_flags_for_new_epoch(config: &NodeConfig) -> Vec { - Self::default_flags_impl(&config.execution_cache, config.state_accumulator_v2) + Self::default_flags_impl(&config.execution_cache) } /// For situations in which there is no config available (e.g. setting up a downloaded snapshot). pub fn default_for_no_config() -> Vec { - Self::default_flags_impl(&Default::default(), true) + Self::default_flags_impl(&Default::default()) } - fn default_flags_impl( - cache_config: &ExecutionCacheConfig, - enable_state_accumulator_v2: bool, - ) -> Vec { - let mut new_flags = vec![EpochFlag::ExecutedInEpochTable]; + fn default_flags_impl(cache_config: &ExecutionCacheConfig) -> Vec { + let mut new_flags = vec![ + EpochFlag::ExecutedInEpochTable, + EpochFlag::StateAccumulatorV2EnabledTestnet, + EpochFlag::StateAccumulatorV2EnabledMainnet, + ]; if matches!( choose_execution_cache(cache_config), @@ -92,11 +93,6 @@ impl EpochFlag { new_flags.push(EpochFlag::WritebackCacheEnabled); } - if enable_state_accumulator_v2 { - new_flags.push(EpochFlag::StateAccumulatorV2EnabledTestnet); - new_flags.push(EpochFlag::StateAccumulatorV2EnabledMainnet); - } - new_flags } }