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
--- a/pallets/refungible/src/benchmarking.rs
+++ b/pallets/refungible/src/benchmarking.rs
@@ -62,7 +62,9 @@
 	create_collection_raw(
 		owner,
 		CollectionMode::ReFungible,
-		|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())
+		},
 		RefungibleHandle::cast,
 	)
 }
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
683 #[cfg(not(any(feature = "unique-runtime", feature = "quartz-runtime")))]683 #[cfg(not(any(feature = "unique-runtime", feature = "quartz-runtime")))]
684 list_benchmark!(list, extra, pallet_refungible, Refungible);684 list_benchmark!(list, extra, pallet_refungible, Refungible);
685685
686 #[cfg(not(any(feature = "unique-runtime", feature = "quartz-runtime")))]686 // #[cfg(not(any(feature = "unique-runtime", feature = "quartz-runtime")))]
687 list_benchmark!(list, extra, pallet_unique_scheduler, Scheduler);687 // list_benchmark!(list, extra, pallet_unique_scheduler, Scheduler);
688688
689 #[cfg(not(any(feature = "unique-runtime", feature = "quartz-runtime")))]689 #[cfg(not(any(feature = "unique-runtime", feature = "quartz-runtime")))]
690 list_benchmark!(list, extra, pallet_proxy_rmrk_core, RmrkCore);690 list_benchmark!(list, extra, pallet_proxy_rmrk_core, RmrkCore);
743 #[cfg(not(any(feature = "unique-runtime", feature = "quartz-runtime")))]743 #[cfg(not(any(feature = "unique-runtime", feature = "quartz-runtime")))]
744 add_benchmark!(params, batches, pallet_refungible, Refungible);744 add_benchmark!(params, batches, pallet_refungible, Refungible);
745745
746 #[cfg(not(any(feature = "unique-runtime", feature = "quartz-runtime")))]746 // #[cfg(not(any(feature = "unique-runtime", feature = "quartz-runtime")))]
747 add_benchmark!(params, batches, pallet_unique_scheduler, Scheduler);747 // add_benchmark!(params, batches, pallet_unique_scheduler, Scheduler);
748748
749 #[cfg(not(any(feature = "unique-runtime", feature = "quartz-runtime")))]749 #[cfg(not(any(feature = "unique-runtime", feature = "quartz-runtime")))]
750 add_benchmark!(params, batches, pallet_proxy_rmrk_core, RmrkCore);750 add_benchmark!(params, batches, pallet_proxy_rmrk_core, RmrkCore);