diff --git a/rs/nervous_system/integration_tests/tests/create_canister_and_install_code.rs b/rs/nervous_system/integration_tests/tests/create_canister_and_install_code.rs index 452d24a8a661..788a234e1e96 100644 --- a/rs/nervous_system/integration_tests/tests/create_canister_and_install_code.rs +++ b/rs/nervous_system/integration_tests/tests/create_canister_and_install_code.rs @@ -28,12 +28,10 @@ async fn test_create_canister_and_install_code() { .build_async() .await; - // Step 1.2: Install NNS canisters with the test governance canister - // (which has the CreateCanisterAndInstallCode feature flag enabled). + // Step 1.2: Install NNS canisters. { let mut nns_installer = NnsInstaller::default(); nns_installer.with_current_nns_canister_versions(); - nns_installer.with_test_governance_canister(); nns_installer.install(&pocket_ic).await; } diff --git a/rs/nns/governance/src/lib.rs b/rs/nns/governance/src/lib.rs index 078711269306..b575f091c694 100644 --- a/rs/nns/governance/src/lib.rs +++ b/rs/nns/governance/src/lib.rs @@ -210,9 +210,6 @@ thread_local! { static ENABLE_NEURON_FOLLOW_RESTRICTIONS: Cell = const { Cell::new(true) }; - static ENABLE_CREATE_CANISTER_AND_INSTALL_CODE_PROPOSALS: Cell - = const { Cell::new(true) }; - static ENABLE_SUBNET_SPLITTING_PROPOSALS: Cell = const { Cell::new(false) }; @@ -285,20 +282,6 @@ pub fn temporarily_disable_neuron_follow_restrictions() -> Temporary { Temporary::new(&ENABLE_NEURON_FOLLOW_RESTRICTIONS, false) } -pub fn are_create_canister_and_install_code_proposals_enabled() -> bool { - ENABLE_CREATE_CANISTER_AND_INSTALL_CODE_PROPOSALS.get() -} - -#[cfg(any(test, feature = "canbench-rs", feature = "test"))] -pub fn temporarily_enable_create_canister_and_install_code_proposals() -> Temporary { - Temporary::new(&ENABLE_CREATE_CANISTER_AND_INSTALL_CODE_PROPOSALS, true) -} - -#[cfg(any(test, feature = "canbench-rs", feature = "test"))] -pub fn temporarily_disable_create_canister_and_install_code_proposals() -> Temporary { - Temporary::new(&ENABLE_CREATE_CANISTER_AND_INSTALL_CODE_PROPOSALS, false) -} - #[cfg(any(test, feature = "canbench-rs", feature = "test"))] pub fn temporarily_enable_subnet_splitting_proposals() -> Temporary { Temporary::new(&ENABLE_SUBNET_SPLITTING_PROPOSALS, true) diff --git a/rs/nns/governance/src/proposals/create_canister_and_install_code.rs b/rs/nns/governance/src/proposals/create_canister_and_install_code.rs index 4945e479bf19..63bacb50b564 100644 --- a/rs/nns/governance/src/proposals/create_canister_and_install_code.rs +++ b/rs/nns/governance/src/proposals/create_canister_and_install_code.rs @@ -1,5 +1,4 @@ use crate::{ - are_create_canister_and_install_code_proposals_enabled, pb::v1::{ CreateCanisterAndInstallCode, GovernanceError, SelfDescribingValue, Topic, canister_settings::{LogVisibility, SnapshotVisibility}, @@ -23,13 +22,6 @@ use ic_nns_handler_root_interface as root; impl CreateCanisterAndInstallCode { pub fn validate(&self) -> Result<(), GovernanceError> { - if !are_create_canister_and_install_code_proposals_enabled() { - return Err(GovernanceError::new_with_message( - ErrorType::InvalidProposal, - "CreateCanisterAndInstallCode proposals are not enabled yet.", - )); - } - let Self { host_subnet_id, canister_settings, @@ -226,24 +218,10 @@ impl CallCanister for CreateCanisterAndInstallCode { type Reply = root::CreateCanisterAndInstallCodeOk; fn canister_and_function(&self) -> Result<(CanisterId, &str), GovernanceError> { - if !are_create_canister_and_install_code_proposals_enabled() { - return Err(GovernanceError::new_with_message( - ErrorType::InvalidProposal, - "CreateCanisterAndInstallCode proposals are not enabled yet.", - )); - } - Ok((ROOT_CANISTER_ID, "create_canister_and_install_code")) } fn payload(&self) -> Result, GovernanceError> { - if !are_create_canister_and_install_code_proposals_enabled() { - return Err(GovernanceError::new_with_message( - ErrorType::InvalidProposal, - "CreateCanisterAndInstallCode proposals are not enabled yet.", - )); - } - let request = root::CreateCanisterAndInstallCodeRequest::try_from(self.clone())?; Encode!(&request).map_err(|e| {