From 87747938bdccf4554b516427bbb2e066456e948f Mon Sep 17 00:00:00 2001 From: Juan Ignacio Rios Date: Tue, 3 Sep 2024 09:03:42 +0200 Subject: [PATCH] hide instantiator behind feature flag --- pallets/funding/Cargo.toml | 1 + pallets/funding/src/lib.rs | 3 +-- runtimes/polimec/Cargo.toml | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/pallets/funding/Cargo.toml b/pallets/funding/Cargo.toml index a3895b2b7..430f2fa90 100644 --- a/pallets/funding/Cargo.toml +++ b/pallets/funding/Cargo.toml @@ -124,3 +124,4 @@ try-runtime = [ "polimec-common/try-runtime", "sp-runtime/try-runtime", ] +on-chain-release-build = [] diff --git a/pallets/funding/src/lib.rs b/pallets/funding/src/lib.rs index 341034cc5..8c49ca64d 100644 --- a/pallets/funding/src/lib.rs +++ b/pallets/funding/src/lib.rs @@ -109,8 +109,7 @@ pub mod mock; #[cfg(test)] pub mod tests; -// TODO: This is used only in tests. Should we use #[cfg(test)]? -// If we do that the integration-tests will complain about the missing `use` statement :( +#[cfg(not(feature = "on-chain-release-build"))] pub mod instantiator; #[cfg(feature = "runtime-benchmarks")] diff --git a/runtimes/polimec/Cargo.toml b/runtimes/polimec/Cargo.toml index 94e923340..acdfc9a5a 100644 --- a/runtimes/polimec/Cargo.toml +++ b/runtimes/polimec/Cargo.toml @@ -275,6 +275,6 @@ try-runtime = [ # A feature that should be enabled when the runtime should be built for on-chain # deployment. This will disable stuff that shouldn't be part of the on-chain wasm # to make it smaller, like logging for example. -on-chain-release-build = [ "sp-api/disable-logging" ] +on-chain-release-build = [ "sp-api/disable-logging", "pallet-funding/on-chain-release-build" ] development-settings = [ "shared-configuration/development-settings" ]