mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-06-16 22:31:03 +00:00
Add force_batch to utility pallet (#11148)
* Add batch_try to utility pallet * lint * rename utility.batch_try -> utility.force_batch * Remove un-needed index field for utility.ItemFailed event * Remove indexes of utility,BatchCompletedWithErrors * Apply suggestions from code review Co-authored-by: Louis Merlin <hello@louismerl.in> Co-authored-by: Louis Merlin <hello@louismerl.in> Co-authored-by: Bastian Köcher <info@kchr.de>
This commit is contained in:
@@ -73,5 +73,18 @@ benchmarks! {
|
||||
let pallets_origin = Into::<T::PalletsOrigin>::into(pallets_origin);
|
||||
}: _(RawOrigin::Root, Box::new(pallets_origin), call)
|
||||
|
||||
force_batch {
|
||||
let c in 0 .. 1000;
|
||||
let mut calls: Vec<<T as Config>::Call> = Vec::new();
|
||||
for i in 0 .. c {
|
||||
let call = frame_system::Call::remark { remark: vec![] }.into();
|
||||
calls.push(call);
|
||||
}
|
||||
let caller = whitelisted_caller();
|
||||
}: _(RawOrigin::Signed(caller), calls)
|
||||
verify {
|
||||
assert_last_event::<T>(Event::BatchCompleted.into())
|
||||
}
|
||||
|
||||
impl_benchmark_test_suite!(Pallet, crate::tests::new_test_ext(), crate::tests::Test);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user