mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-05-30 03:31:05 +00:00
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:
@@ -278,7 +278,8 @@ frame_benchmarking::benchmarks! {
|
||||
let witness = SolutionOrSnapshotSize { voters: v, targets: t };
|
||||
let raw_solution = solution_with_size::<T>(witness, a, d)?;
|
||||
let ready_solution =
|
||||
<MultiPhase<T>>::feasibility_check(raw_solution, ElectionCompute::Signed)?;
|
||||
<MultiPhase<T>>::feasibility_check(raw_solution, ElectionCompute::Signed)
|
||||
.map_err(<&str>::from)?;
|
||||
<CurrentPhase<T>>::put(Phase::Signed);
|
||||
// assume a queued solution is stored, regardless of where it comes from.
|
||||
<QueuedSolution<T>>::put(ready_solution);
|
||||
@@ -307,7 +308,7 @@ frame_benchmarking::benchmarks! {
|
||||
..Default::default()
|
||||
};
|
||||
|
||||
<MultiPhase<T>>::create_snapshot()?;
|
||||
<MultiPhase<T>>::create_snapshot().map_err(<&str>::from)?;
|
||||
MultiPhase::<T>::on_initialize_open_signed();
|
||||
<Round<T>>::put(1);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user