diff --git a/.github/workflows/check.yml b/.github/workflows/check.yml index 143cca4..ee663f7 100644 --- a/.github/workflows/check.yml +++ b/.github/workflows/check.yml @@ -29,6 +29,7 @@ jobs: run: | rustup update stable --no-self-update rustup target add wasm32-unknown-unknown + rustup component add rust-src --toolchain stable-x86_64-unknown-linux-gnu # Rust cache - uses: Swatinem/rust-cache@v2 diff --git a/Cargo.lock b/Cargo.lock index b6e155e..1cc9da3 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -5524,6 +5524,7 @@ dependencies = [ "sp-session", "sp-staking", "sp-std 14.0.0 (git+https://github.com/paritytech/polkadot-sdk.git?tag=polkadot-v1.9.0)", + "sp-storage 19.0.0 (git+https://github.com/paritytech/polkadot-sdk.git?tag=polkadot-v1.9.0)", "sp-transaction-pool", "sp-version", "static_assertions", diff --git a/crates/pallet-farmers-fortune/src/benchmarking.rs b/crates/pallet-farmers-fortune/src/benchmarking.rs index 9688361..8dc8ca3 100644 --- a/crates/pallet-farmers-fortune/src/benchmarking.rs +++ b/crates/pallet-farmers-fortune/src/benchmarking.rs @@ -28,7 +28,7 @@ benchmarks! { [u8; 32]: Into<::AccountId>, [u8; 32]: From<::Hash>, [u8; 32]: Into<::Hash>, - u32: From<::BlockNumber>, + u32: From>, BalanceOf: From, T: Config>, T: pallet_melo_store::Config, @@ -41,8 +41,8 @@ benchmarks! { System::::set_block_number(6u32.into()); let header_hash: T::Hash = BLOCK_HASH1.into(); - let block_num5: T::BlockNumber = 5u32.into(); - let block_num3: T::BlockNumber = 3u32.into(); + let block_num5: BlockNumberFor = 5u32.into(); + let block_num3: BlockNumberFor = 3u32.into(); >::insert(block_num5, header_hash); >::insert(block_num3, header_hash); diff --git a/runtime/Cargo.toml b/runtime/Cargo.toml index 0aa373d..c6a6399 100644 --- a/runtime/Cargo.toml +++ b/runtime/Cargo.toml @@ -94,6 +94,7 @@ sp-version = { default-features = false, git = "https://github.com/paritytech/po ] } sp-staking = { git = "https://github.com/paritytech/polkadot-sdk.git", tag = "polkadot-v1.9.0", default-features = false, features = ["serde"] } sp-genesis-builder = { default-features = false, git = "https://github.com/paritytech/polkadot-sdk.git", tag = "polkadot-v1.9.0" } +sp-storage = { default-features = false, git = "https://github.com/paritytech/polkadot-sdk.git", tag = "polkadot-v1.9.0" } node-primitives = { git = "https://github.com/paritytech/polkadot-sdk.git", tag = "polkadot-v1.9.0", default-features = false } @@ -186,6 +187,7 @@ std = [ "sp-version/std", "sp-io/std", "sp-genesis-builder/std", + "sp-storage/std", "substrate-wasm-builder", "frame-executive-ext/std", # "frame-executive/std", diff --git a/runtime/src/lib.rs b/runtime/src/lib.rs index 464833e..f90d77b 100644 --- a/runtime/src/lib.rs +++ b/runtime/src/lib.rs @@ -626,6 +626,8 @@ impl pallet_treasury::Config for Runtime { type Paymaster = PayAssetFromAccount; type BalanceConverter = AssetRate; type PayoutPeriod = gov::SpendPayoutPeriod; + #[cfg(feature = "runtime-benchmarks")] + type BenchmarkHelper = (); type OnSlash = (); type ProposalBondMaximum = (); @@ -1517,8 +1519,8 @@ impl_runtime_apis! { fn dispatch_benchmark( config: frame_benchmarking::BenchmarkConfig ) -> Result, sp_runtime::RuntimeString> { - use frame_benchmarking::{baseline, Benchmarking, BenchmarkBatch, TrackedStorageKey}; - + use frame_benchmarking::{baseline, Benchmarking, BenchmarkBatch}; + use sp_storage::TrackedStorageKey; use frame_system_benchmarking::Pallet as SystemBench; use baseline::Pallet as BaselineBench;