git.delta.rocks / unique-network / refs/commits / 460ecccc2904

difftreelog

fix benchmarks

Daniel Shiposha2022-10-21parent: #f2a945f.patch.diff
in: master

5 files changed

modifiedpallets/fungible/src/benchmarking.rsdiffbeforeafterboth
--- a/pallets/fungible/src/benchmarking.rs
+++ b/pallets/fungible/src/benchmarking.rs
@@ -31,7 +31,9 @@
 	create_collection_raw(
 		owner,
 		CollectionMode::Fungible(0),
-		|owner: T::CrossAccountId, data| <Pallet<T>>::init_collection(owner.clone(), owner, data),
+		|owner: T::CrossAccountId, data| {
+			<Pallet<T>>::init_collection(owner.clone(), owner, data, Default::default())
+		},
 		FungibleHandle::cast,
 	)
 }
modifiedpallets/refungible/src/benchmarking.rsdiffbeforeafterboth
62 create_collection_raw(62 create_collection_raw(
63 owner,63 owner,
64 CollectionMode::ReFungible,64 CollectionMode::ReFungible,
65 |owner: T::CrossAccountId, data| <Pallet<T>>::init_collection(owner.clone(), owner, data),65 |owner: T::CrossAccountId, data| {
66 <Pallet<T>>::init_collection(owner.clone(), owner, data, Default::default())
67 },
66 RefungibleHandle::cast,68 RefungibleHandle::cast,
67 )69 )
68}70}
modifiedpallets/scheduler/src/benchmarking.rsdiffbeforeafterboth
--- a/pallets/scheduler/src/benchmarking.rs
+++ b/pallets/scheduler/src/benchmarking.rs
@@ -93,9 +93,9 @@
 	Ok(())
 }
 
-fn call_and_hash<T: Config>(i: u32) -> (<T as Config>::Call, T::Hash) {
+fn call_and_hash<T: Config>(i: u32) -> (<T as Config>::RuntimeCall, T::Hash) {
 	// Essentially a no-op call.
-	let call: <T as Config>::Call = frame_system::Call::remark { remark: i.encode() }.into();
+	let call: <T as Config>::RuntimeCall = frame_system::Call::remark { remark: i.encode() }.into();
 	let hash = T::Hashing::hash_of(&call);
 	(call, hash)
 }
modifiedpallets/structure/src/benchmarking.rsdiffbeforeafterboth
--- a/pallets/structure/src/benchmarking.rs
+++ b/pallets/structure/src/benchmarking.rs
@@ -19,7 +19,8 @@
 use frame_benchmarking::{benchmarks, account};
 use frame_support::traits::{Currency, Get};
 use up_data_structs::{
-	CreateCollectionData, CollectionMode, CreateItemData, CreateNftData, budget::Unlimited,
+	CreateCollectionData, CollectionMode, CreateItemData, CollectionFlags, CreateNftData,
+	budget::Unlimited,
 };
 use pallet_common::Config as CommonConfig;
 use pallet_evm::account::CrossAccountId;
@@ -32,10 +33,15 @@
 		let caller_cross = T::CrossAccountId::from_sub(caller.clone());
 
 		<T as CommonConfig>::Currency::deposit_creating(&caller, T::CollectionCreationPrice::get());
-		T::CollectionDispatch::create(caller_cross.clone(), caller_cross.clone(), CreateCollectionData {
-			mode: CollectionMode::NFT,
-			..Default::default()
-		})?;
+		T::CollectionDispatch::create(
+			caller_cross.clone(),
+			caller_cross.clone(),
+			CreateCollectionData {
+				mode: CollectionMode::NFT,
+				..Default::default()
+			},
+			CollectionFlags::default(),
+		)?;
 		let dispatch = T::CollectionDispatch::dispatch(CollectionHandle::try_get(CollectionId(1))?);
 		let dispatch = dispatch.as_dyn();
 
modifiedruntime/common/runtime_apis.rsdiffbeforeafterboth
--- a/runtime/common/runtime_apis.rs
+++ b/runtime/common/runtime_apis.rs
@@ -683,8 +683,8 @@
                     #[cfg(not(any(feature = "unique-runtime", feature = "quartz-runtime")))]
                     list_benchmark!(list, extra, pallet_refungible, Refungible);
 
-                    #[cfg(not(any(feature = "unique-runtime", feature = "quartz-runtime")))]
-                    list_benchmark!(list, extra, pallet_unique_scheduler, Scheduler);
+                    // #[cfg(not(any(feature = "unique-runtime", feature = "quartz-runtime")))]
+                    // list_benchmark!(list, extra, pallet_unique_scheduler, Scheduler);
 
                     #[cfg(not(any(feature = "unique-runtime", feature = "quartz-runtime")))]
                     list_benchmark!(list, extra, pallet_proxy_rmrk_core, RmrkCore);
@@ -743,8 +743,8 @@
                     #[cfg(not(any(feature = "unique-runtime", feature = "quartz-runtime")))]
                     add_benchmark!(params, batches, pallet_refungible, Refungible);
 
-                    #[cfg(not(any(feature = "unique-runtime", feature = "quartz-runtime")))]
-                    add_benchmark!(params, batches, pallet_unique_scheduler, Scheduler);
+                    // #[cfg(not(any(feature = "unique-runtime", feature = "quartz-runtime")))]
+                    // add_benchmark!(params, batches, pallet_unique_scheduler, Scheduler);
 
                     #[cfg(not(any(feature = "unique-runtime", feature = "quartz-runtime")))]
                     add_benchmark!(params, batches, pallet_proxy_rmrk_core, RmrkCore);