difftreelog
fix broken benchmarking
in: master
4 files changed
node/cli/Cargo.tomldiffbeforeafterboth--- a/node/cli/Cargo.toml
+++ b/node/cli/Cargo.toml
@@ -317,4 +317,7 @@
[features]
default = []
-runtime-benchmarks = ['nft-runtime/runtime-benchmarks']
+runtime-benchmarks = [
+ 'nft-runtime/runtime-benchmarks',
+ 'polkadot-service/runtime-benchmarks',
+]
pallets/nft-transaction-payment/src/benchmarking.rsdiffbeforeafterboth--- a/pallets/nft-transaction-payment/src/benchmarking.rs
+++ /dev/null
@@ -1,18 +0,0 @@
-#![cfg(feature = "runtime-benchmarks")]
-
-use super::*;
-
-use sp_std::prelude::*;
-use frame_system::RawOrigin;
-use frame_benchmarking::{benchmarks};
-use frame_support::traits::OnInitialize;
-
-benchmarks! {
-
- // on_initialize {
- // let block1: T::BlockNumber = T::BlockNumber::from(1u32);
- // let block2: T::BlockNumber = T::BlockNumber::from(2u32);
- // Inflation::<T>::on_initialize(block1); // Create Treasury account
- // }: { Inflation::<T>::on_initialize(block2); } // Benchmark deposit_into_existing path
-
-}
pallets/nft-transaction-payment/src/lib.rsdiffbeforeafterboth1//2// This file is subject to the terms and conditions defined in3// file 'LICENSE', which is part of this source code package.4//56#![cfg_attr(not(feature = "std"), no_std)]78#[cfg(feature = "std")]9pub use std::*;1011#[cfg(feature = "std")]12pub use serde::*;1314#[cfg(feature = "runtime-benchmarks")]15mod benchmarking;1617use frame_support::{decl_module, decl_storage};18use sp_std::prelude::*;19use up_sponsorship::SponsorshipHandler;2021pub trait Config: frame_system::Config + pallet_transaction_payment::Config {22 type SponsorshipHandler: SponsorshipHandler<Self::AccountId, Self::Call>;23}2425decl_storage! {26 trait Store for Module<T: Config> as NftTransactionPayment{27 }28}2930decl_module! {31 pub struct Module<T: Config> for enum Call32 where33 origin: T::Origin,34 {35 }36}3738impl<T: Config> Module<T> {39 pub fn withdraw_type(who: &T::AccountId, call: &T::Call) -> Option<T::AccountId> {40 T::SponsorshipHandler::get_sponsor(who, call)41 }42}1//2// This file is subject to the terms and conditions defined in3// file 'LICENSE', which is part of this source code package.4//56#![cfg_attr(not(feature = "std"), no_std)]78#[cfg(feature = "std")]9pub use std::*;1011#[cfg(feature = "std")]12pub use serde::*;1314use frame_support::{decl_module, decl_storage};15use sp_std::prelude::*;16use up_sponsorship::SponsorshipHandler;1718pub trait Config: frame_system::Config + pallet_transaction_payment::Config {19 type SponsorshipHandler: SponsorshipHandler<Self::AccountId, Self::Call>;20}2122decl_storage! {23 trait Store for Module<T: Config> as NftTransactionPayment{24 }25}2627decl_module! {28 pub struct Module<T: Config> for enum Call29 where30 origin: T::Origin,31 {32 }33}3435impl<T: Config> Module<T> {36 pub fn withdraw_type(who: &T::AccountId, call: &T::Call) -> Option<T::AccountId> {37 T::SponsorshipHandler::get_sponsor(who, call)38 }39}runtime/Cargo.tomldiffbeforeafterboth--- a/runtime/Cargo.toml
+++ b/runtime/Cargo.toml
@@ -28,7 +28,9 @@
'pallet-timestamp/runtime-benchmarks',
'pallet-nft/runtime-benchmarks',
'pallet-inflation/runtime-benchmarks',
+ 'pallet-xcm/runtime-benchmarks',
'sp-runtime/runtime-benchmarks',
+ 'xcm-builder/runtime-benchmarks',
]
std = [
'codec/std',