mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-06-19 03:01:02 +00:00
EPM and staking events improvement (#13035)
* EPM and staking events improvement * Uses RawOrigin in ElectionCompute event * Refactors new phase events to PhaseTransition event * PhaseTransitioned and remove RawOrigin from event * Adds helpers for epm phase transition and staking force new * addresses review comments * nit: removes unecessary clone * fixes benchmarks Co-authored-by: parity-processbot <>
This commit is contained in:
@@ -200,7 +200,7 @@ frame_benchmarking::benchmarks! {
|
||||
assert!(<MultiPhase<T>>::snapshot().is_none());
|
||||
assert!(<MultiPhase<T>>::current_phase().is_off());
|
||||
}: {
|
||||
<MultiPhase<T>>::on_initialize_open_signed();
|
||||
<MultiPhase<T>>::phase_transition(Phase::Signed);
|
||||
} verify {
|
||||
assert!(<MultiPhase<T>>::snapshot().is_none());
|
||||
assert!(<MultiPhase<T>>::current_phase().is_signed());
|
||||
@@ -210,7 +210,8 @@ frame_benchmarking::benchmarks! {
|
||||
assert!(<MultiPhase<T>>::snapshot().is_none());
|
||||
assert!(<MultiPhase<T>>::current_phase().is_off());
|
||||
}: {
|
||||
<MultiPhase<T>>::on_initialize_open_unsigned(true, 1u32.into())
|
||||
let now = frame_system::Pallet::<T>::block_number();
|
||||
<MultiPhase<T>>::phase_transition(Phase::Unsigned((true, now)));
|
||||
} verify {
|
||||
assert!(<MultiPhase<T>>::snapshot().is_none());
|
||||
assert!(<MultiPhase<T>>::current_phase().is_unsigned());
|
||||
@@ -318,7 +319,7 @@ frame_benchmarking::benchmarks! {
|
||||
submit {
|
||||
// the queue is full and the solution is only better than the worse.
|
||||
<MultiPhase<T>>::create_snapshot().map_err(<&str>::from)?;
|
||||
MultiPhase::<T>::on_initialize_open_signed();
|
||||
<MultiPhase<T>>::phase_transition(Phase::Signed);
|
||||
<Round<T>>::put(1);
|
||||
|
||||
let mut signed_submissions = SignedSubmissions::<T>::get();
|
||||
|
||||
Reference in New Issue
Block a user