Unverified Commit 0a66959c authored by Shawn Tabrizi's avatar Shawn Tabrizi Committed by GitHub
Browse files

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

* fix benchmark return

* update weight

* update Substrate

Co-authored-by: parity-processbot <>
parent f95e308e
Pipeline #153437 passed with stages
in 41 minutes and 28 seconds
This diff is collapsed.
......@@ -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))
}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment