diff --git a/libs/mocks/src/fees.rs b/libs/mocks/src/fees.rs index 9a7188c879..dc67d8de6a 100644 --- a/libs/mocks/src/fees.rs +++ b/libs/mocks/src/fees.rs @@ -71,8 +71,5 @@ pub mod pallet { ) -> DispatchResult { execute_call!((a, b)) } - - #[cfg(feature = "runtime-benchmarks")] - fn add_fee_requirements(_: &Self::AccountId, _: Fee) {} } } diff --git a/libs/traits/src/lib.rs b/libs/traits/src/lib.rs index b12b97539e..a6c9cad66a 100644 --- a/libs/traits/src/lib.rs +++ b/libs/traits/src/lib.rs @@ -452,7 +452,7 @@ pub mod fees { /// Allows to initialize an initial state required for a pallet that /// calls pay a fee #[cfg(feature = "runtime-benchmarks")] - fn add_fee_requirements(from: &Self::AccountId, fee: Fee); + fn add_fee_requirements(_from: &Self::AccountId, _fee: Fee) {} } /// Trait to pay fees @@ -707,6 +707,11 @@ pub trait ValueProvider { type Timestamp; fn get(source: &Source, id: &Key) -> Result<(Self::Value, Self::Timestamp), DispatchError>; + + /// Allows to initialize an initial state required for a pallet that + /// calls `get()`. + #[cfg(feature = "runtime-benchmarks")] + fn set(_: &Source, _: &Key) {} } /// A provider that never returns a value diff --git a/runtime/common/src/oracle.rs b/runtime/common/src/oracle.rs index 60667055c0..77769cd52e 100644 --- a/runtime/common/src/oracle.rs +++ b/runtime/common/src/oracle.rs @@ -180,4 +180,13 @@ where Ok((balance, timestamp)) } + + /// Allows to initialize an initial state required for a pallet that + /// calls `get()`. + #[cfg(feature = "runtime-benchmarks")] + fn set((account_id, pool_id): &(AccountId, PoolId), key: &OracleKey) { + // TODO + // initialize pool + // initialize asset_registry + } }