Further Improve Gov V2 Stuff (#12028)

* refactor and improve successful origin

* use appropriate origin for creating referendum

* fmt

* add setup tally feature for benchmarks

* feedback updates

* fmt

* Update frame/referenda/src/benchmarking.rs

Co-authored-by: Gavin Wood <gavin@parity.io>

* feedback on `setup` trait

* fix

Co-authored-by: Gavin Wood <gavin@parity.io>
This commit is contained in:
Shawn Tabrizi
2022-08-14 19:36:19 +01:00
committed by GitHub
parent bc6f7bdda9
commit 6b0203c8c4
6 changed files with 210 additions and 81 deletions
@@ -93,6 +93,9 @@ impl<
let ayes = approval.mul_ceil(support);
Self { ayes, nays: support - ayes, support, dummy: PhantomData }
}
#[cfg(feature = "runtime-benchmarks")]
fn setup(_: Class, _: Perbill) {}
}
impl<