Custom Benchmark Errors and Override (#9517)

* initial idea

* update benchmark test to frame v2

* fix some errors

* fixes for elec phrag

* fix tests

* update extrinsic time and docs

* fix import

* undo extra changes

* helper function

* wrong way

* Update frame/benchmarking/src/utils.rs

Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com>

* doesnt need encode/decode

* fix benchmark return

Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com>
This commit is contained in:
Shawn TabriziandBastian Köcher authored and GitHub committed 2021-08-19 12:34:56 +00:00
1 parent 7a32c3504d
commit ccfe485b91
13 files changed
+254 -136

No files matched your search

@@ -438,7 +438,7 @@ frame_benchmarking::benchmarks! {
set_up_data_provider::<T>(v, t);
assert!(<MultiPhase<T>>::snapshot().is_none());
}: {
<MultiPhase::<T>>::create_snapshot()?
<MultiPhase::<T>>::create_snapshot().map_err(|_| "could not create snapshot")?;
} verify {
assert!(<MultiPhase<T>>::snapshot().is_some());
assert_eq!(<MultiPhase<T>>::snapshot_metadata().ok_or("snapshot missing")?.voters, v + t);