--- a/pallets/common/src/benchmarking.rs +++ b/pallets/common/src/benchmarking.rs @@ -98,6 +98,7 @@ token_owner: false, collection_admin: false, restricted: None, + #[cfg(feature = "runtime-benchmarks")] permissive: true, }), mint_mode: Some(true), --- a/pallets/common/src/lib.rs +++ b/pallets/common/src/lib.rs @@ -1212,14 +1212,7 @@ limit_default_clone!(old_limit, new_limit, access => {}, mint_mode => {}, - nesting => { - #[cfg(not(feature = "runtime-benchmarks"))] - ensure!( - // Permissive is only allowed for tests and internal usage of chain for now - old_limit.permissive || !new_limit.permissive, - >::NoPermission, - ) - }, + nesting => { /* todo check for permissive, if only it gets out of benchmarks */ }, ); Ok(new_limit) } --- a/pallets/nonfungible/src/lib.rs +++ b/pallets/nonfungible/src/lib.rs @@ -1038,7 +1038,13 @@ nesting_budget: &dyn Budget, ) -> DispatchResult { let nesting = handle.permissions.nesting(); - if nesting.permissive { + + #[cfg(not(feature = "runtime-benchmarks"))] + let permissive = false; + #[cfg(feature = "runtime-benchmarks")] + let permissive = nesting.permissive; + + if permissive { // Pass } else if nesting.token_owner && >::check_indirectly_owned( --- a/pallets/proxy-rmrk-core/src/lib.rs +++ b/pallets/proxy-rmrk-core/src/lib.rs @@ -205,7 +205,7 @@ token_owner: true, collection_admin: false, restricted: None, - + #[cfg(feature = "runtime-benchmarks")] permissive: false, }), ..Default::default() --- a/primitives/data-structs/src/lib.rs +++ b/primitives/data-structs/src/lib.rs @@ -454,7 +454,7 @@ token_owner: false, collection_admin: false, restricted: None, - + #[cfg(feature = "runtime-benchmarks")] permissive: false, }; self.nesting.as_ref().unwrap_or(&DEFAULT) @@ -499,6 +499,7 @@ /// If set - only tokens from specified collections can be nested pub restricted: Option, + #[cfg(feature = "runtime-benchmarks")] /// Anyone can nest tokens, mutually exclusive with `token_owner`, `admin` pub permissive: bool, }