From dcd47d657c40163f70e68d5eaebbf4fa3bb3d461 Mon Sep 17 00:00:00 2001 From: "ron.yang" Date: Wed, 28 Jul 2021 10:36:25 +0800 Subject: [PATCH] Fix benchmarking&CI integration --- .github/workflows/pr-build.yml | 4 +++- pallets/salp/Cargo.toml | 2 ++ pallets/salp/src/benchmarking.rs | 10 +++++++--- 3 files changed, 12 insertions(+), 4 deletions(-) diff --git a/.github/workflows/pr-build.yml b/.github/workflows/pr-build.yml index fb26144068..d3dd3bac79 100644 --- a/.github/workflows/pr-build.yml +++ b/.github/workflows/pr-build.yml @@ -36,7 +36,9 @@ jobs: - name: Check All run: make check-all - name: Test All - run: make test-all + run: | + make test-all + make test-benchmarking - name: Inform buddies online uses: 8398a7/action-slack@v3 if: always() && (github.event_name == 'pull_request' && github.event.pull_request.draft == false) diff --git a/pallets/salp/Cargo.toml b/pallets/salp/Cargo.toml index 0b86930027..1cd5e52bcd 100644 --- a/pallets/salp/Cargo.toml +++ b/pallets/salp/Cargo.toml @@ -17,6 +17,8 @@ sp-arithmetic = { version = "3.0.0", default-features = false } xcm = { git = "https://github.com/paritytech/polkadot", branch = "release-v0.9.8", default-features = false } xcm-support = { path = "../../xcm-support", default-features = false } orml-traits = { version = "0.4.1-dev", default-features = false } +xcm-builder = { git = "https://github.com/paritytech/polkadot", default-features = false, branch = "release-v0.9.8" } +pallet-xcm = { git = "https://github.com/paritytech/polkadot", default-features = false, branch = "release-v0.9.8" } polkadot-parachain = { git = "https://github.com/paritytech/polkadot", default-features = false, branch = "release-v0.9.8" } [dev-dependencies] diff --git a/pallets/salp/src/benchmarking.rs b/pallets/salp/src/benchmarking.rs index ea2aed6543..eab2c05a6c 100644 --- a/pallets/salp/src/benchmarking.rs +++ b/pallets/salp/src/benchmarking.rs @@ -42,7 +42,11 @@ fn create_fund(id: u32) -> ParaId { let caller = account("fund_creator", id, 0); - assert_ok!(CurrencyOf::::deposit(Salp::::token(), &caller, T::SubmissionDeposit::get())); + assert_ok!(::MultiCurrency::deposit( + ::DepositToken::get(), + &caller, + T::SubmissionDeposit::get() + )); assert_ok!(Salp::::create( RawOrigin::Signed(caller).into(), @@ -71,8 +75,8 @@ benchmarks! { let caller: T::AccountId = whitelisted_caller(); - CurrencyOf::::deposit( - Salp::::token(), + ::MultiCurrency::deposit( + ::DepositToken::get(), &caller, T::SubmissionDeposit::get(), )?;