Companion for #9517 (Custom BenchmarkError) (#3600)

* fix benchmark return

* update weight

* update Substrate

Co-authored-by: parity-processbot <>
This commit is contained in:
Shawn Tabrizi
2021-08-19 15:18:46 +02:00
committed by GitHub
parent 94b415de75
commit e265d2e896
4 changed files with 163 additions and 155 deletions
+153 -153
View File
File diff suppressed because it is too large Load Diff
+2 -2
View File
@@ -1415,7 +1415,7 @@ mod benchmarking {
let source = sp_runtime::transaction_validity::TransactionSource::External;
let call = Call::<T>::claim(account.clone(), signature.clone());
}: {
super::Pallet::<T>::validate_unsigned(source, &call)?;
super::Pallet::<T>::validate_unsigned(source, &call).map_err(|e| -> &'static str { e.into() })?;
super::Pallet::<T>::claim(RawOrigin::None.into(), account, signature)?;
}
verify {
@@ -1461,7 +1461,7 @@ mod benchmarking {
let call = Call::<T>::claim_attest(account.clone(), signature.clone(), StatementKind::Regular.to_text().to_vec());
let source = sp_runtime::transaction_validity::TransactionSource::External;
}: {
super::Pallet::<T>::validate_unsigned(source, &call)?;
super::Pallet::<T>::validate_unsigned(source, &call).map_err(|e| -> &'static str { e.into() })?;
super::Pallet::<T>::claim_attest(RawOrigin::None.into(), account, signature, statement.to_text().to_vec())?;
}
verify {
@@ -92,6 +92,10 @@ impl<T: frame_system::Config> pallet_elections_phragmen::WeightInfo for WeightIn
.saturating_add(T::DbWeight::get().reads(5 as Weight))
.saturating_add(T::DbWeight::get().writes(5 as Weight))
}
// Storage: Benchmark Override (r:0 w:0)
fn remove_member_without_replacement() -> Weight {
(2_000_000_000_000 as Weight)
}
fn remove_member_wrong_refund() -> Weight {
(8_551_000 as Weight).saturating_add(T::DbWeight::get().reads(1 as Weight))
}
@@ -97,6 +97,10 @@ impl<T: frame_system::Config> pallet_elections_phragmen::WeightInfo for WeightIn
.saturating_add(T::DbWeight::get().reads(5 as Weight))
.saturating_add(T::DbWeight::get().writes(5 as Weight))
}
// Storage: Benchmark Override (r:0 w:0)
fn remove_member_without_replacement() -> Weight {
(2_000_000_000_000 as Weight)
}
fn remove_member_wrong_refund() -> Weight {
(6_347_000 as Weight).saturating_add(T::DbWeight::get().reads(1 as Weight))
}