From 683dce0b262625c22a0bcdd84eb9eab12a16b3a3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Luis=20Enrique=20Mu=C3=B1oz=20Mart=C3=ADn?= Date: Fri, 26 Jan 2024 13:55:36 +0100 Subject: [PATCH] fix pool registry test compilation (#1701) --- pallets/pool-registry/src/mock.rs | 21 ++++++--------------- 1 file changed, 6 insertions(+), 15 deletions(-) diff --git a/pallets/pool-registry/src/mock.rs b/pallets/pool-registry/src/mock.rs index 232f740e24..1e3f6f850a 100644 --- a/pallets/pool-registry/src/mock.rs +++ b/pallets/pool-registry/src/mock.rs @@ -19,13 +19,12 @@ use cfg_primitives::{ TrancheWeight, }; use cfg_traits::{ - benchmarking::PoolFeesBenchmarkHelper, fee::PoolFeeBucket, investments::OrderManager, Millis, - PoolMutate, PoolUpdateGuard, PreConditions, Seconds, UpdateState, + fee::PoolFeeBucket, investments::OrderManager, Millis, PoolMutate, PoolUpdateGuard, + PreConditions, Seconds, UpdateState, }; use cfg_types::{ fixed_point::{Quantity, Rate}, permissions::{PermissionScope, Role}, - pools::PoolFeeInfo, tokens::{CurrencyId, CustomMetadata, TrancheCurrency}, }; use frame_support::{ @@ -36,8 +35,6 @@ use frame_support::{ }; use frame_system::EnsureSigned; use orml_traits::{asset_registry::AssetMetadata, parameter_type_with_key}; -#[cfg(feature = "runtime-benchmarks")] -use pallet_pool_system::benchmarking::create_pool; use pallet_pool_system::{ pool_types::{PoolChanges, PoolDetails, ScheduledUpdateDetails}, tranches::TrancheInput, @@ -240,10 +237,6 @@ where T: Config + pallet_pool_system::Config + pallet_pool_fees::Config, - ::PoolFees: PoolFeesBenchmarkHelper< - PoolId = u64, - PoolFeeInfo = PoolFeeInfo::Rate>, - >, { type Balance = ::Balance; type CurrencyId = ::CurrencyId; @@ -258,7 +251,7 @@ where >; type PoolFeeInput = ( PoolFeeBucket, - <::PoolFees as PoolFeesBenchmarkHelper>::PoolFeeInfo, + <::PoolFees as cfg_traits::fee::PoolFees>::FeeInfo, ); type TrancheInput = TrancheInput< ::Rate, @@ -267,16 +260,14 @@ where >; fn create( - admin: T::AccountId, + _admin: T::AccountId, _depositor: T::AccountId, _pool_id: ::PoolId, - tranche_inputs: Vec, + _tranche_inputs: Vec, _currency: ::CurrencyId, _max_reserve: ::Balance, - pool_fees: Vec, + _pool_fees: Vec, ) -> DispatchResult { - #[cfg(feature = "runtime-benchmarks")] - create_pool::(tranche_inputs.len() as u32, pool_fees.len() as u32, admin)?; Ok(()) }