Dont Convert Benchmark Error Too Early (#9743)

* dont convert benchmark error

* fix warning

* fix more warnings

* more fixes

* more fixes

* add missing feature deps

* Update frame/election-provider-multi-phase/src/benchmarking.rs

Co-authored-by: Alexander Theißen <alex.theissen@me.com>

* Update frame/election-provider-multi-phase/src/benchmarking.rs

Co-authored-by: Alexander Theißen <alex.theissen@me.com>

* use from

Co-authored-by: Alexander Theißen <alex.theissen@me.com>
This commit is contained in:
Shawn Tabrizi
2021-09-10 08:06:24 -04:00
committed by GitHub
parent a36e881783
commit 250f9fc1ae
10 changed files with 34 additions and 13 deletions
+5 -3
View File
@@ -134,7 +134,8 @@ benchmarks! {
Bounties::<T>::on_initialize(T::BlockNumber::zero());
let bounty_id = BountyCount::get() - 1;
let curator = T::Lookup::lookup(curator_lookup)?;
let curator = T::Lookup::lookup(curator_lookup).map_err(<&str>::from)?;
let beneficiary = T::Lookup::unlookup(account("beneficiary", 0, SEED));
}: _(RawOrigin::Signed(curator), bounty_id, beneficiary)
@@ -144,7 +145,8 @@ benchmarks! {
Bounties::<T>::on_initialize(T::BlockNumber::zero());
let bounty_id = BountyCount::get() - 1;
let curator = T::Lookup::lookup(curator_lookup)?;
let curator = T::Lookup::lookup(curator_lookup).map_err(<&str>::from)?;
let beneficiary_account: T::AccountId = account("beneficiary", 0, SEED);
let beneficiary = T::Lookup::unlookup(beneficiary_account.clone());
@@ -181,7 +183,7 @@ benchmarks! {
Bounties::<T>::on_initialize(T::BlockNumber::zero());
let bounty_id = BountyCount::get() - 1;
let curator = T::Lookup::lookup(curator_lookup)?;
let curator = T::Lookup::lookup(curator_lookup).map_err(<&str>::from)?;
}: _(RawOrigin::Signed(curator), bounty_id, Vec::new())
verify {
assert_last_event::<T>(RawEvent::BountyExtended(bounty_id).into())