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:
Jun Jiang
2022-05-05 18:44:13 +08:00
committed by GitHub
parent b24d1a2c23
commit f9e4e87efa
4 changed files with 130 additions and 0 deletions
+11
View File
@@ -50,6 +50,7 @@ pub trait WeightInfo {
fn as_derivative() -> Weight;
fn batch_all(c: u32, ) -> Weight;
fn dispatch_as() -> Weight;
fn force_batch(c: u32, ) -> Weight;
}
/// Weights for pallet_utility using the Substrate node and recommended hardware.
@@ -71,6 +72,11 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
fn dispatch_as() -> Weight {
(8_463_000 as Weight)
}
fn force_batch(c: u32, ) -> Weight {
(13_988_000 as Weight)
// Standard Error: 1_000
.saturating_add((2_481_000 as Weight).saturating_mul(c as Weight))
}
}
// For backwards compatibility and tests
@@ -91,4 +97,9 @@ impl WeightInfo for () {
fn dispatch_as() -> Weight {
(8_463_000 as Weight)
}
fn force_batch(c: u32, ) -> Weight {
(13_988_000 as Weight)
// Standard Error: 1_000
.saturating_add((2_481_000 as Weight).saturating_mul(c as Weight))
}
}