mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-04-26 15:47:58 +00:00
better way to resolve Phase::Emergency via governance (#10663)
* better way to resolve Phase::Emergency via governance * Update frame/election-provider-multi-phase/src/lib.rs Co-authored-by: Zeke Mostov <z.mostov@gmail.com> * review grumbles * Update frame/election-provider-support/src/onchain.rs Co-authored-by: Shawn Tabrizi <shawntabrizi@gmail.com> * revert usize -> u32 Co-authored-by: Zeke Mostov <z.mostov@gmail.com> Co-authored-by: Shawn Tabrizi <shawntabrizi@gmail.com>
This commit is contained in:
@@ -23,6 +23,7 @@
|
||||
#![recursion_limit = "256"]
|
||||
|
||||
use codec::{Decode, Encode, MaxEncodedLen};
|
||||
use frame_election_provider_support::onchain;
|
||||
use frame_support::{
|
||||
construct_runtime, parameter_types,
|
||||
traits::{
|
||||
@@ -528,12 +529,6 @@ parameter_types! {
|
||||
pub OffchainRepeat: BlockNumber = 5;
|
||||
}
|
||||
|
||||
use frame_election_provider_support::onchain;
|
||||
impl onchain::Config for Runtime {
|
||||
type Accuracy = Perbill;
|
||||
type DataProvider = Staking;
|
||||
}
|
||||
|
||||
pub struct StakingBenchmarkingConfig;
|
||||
impl pallet_staking::BenchmarkingConfig for StakingBenchmarkingConfig {
|
||||
type MaxNominators = ConstU32<1000>;
|
||||
@@ -649,6 +644,11 @@ impl frame_support::pallet_prelude::Get<Option<(usize, sp_npos_elections::Extend
|
||||
}
|
||||
}
|
||||
|
||||
impl onchain::Config for Runtime {
|
||||
type Accuracy = Perbill;
|
||||
type DataProvider = <Self as pallet_election_provider_multi_phase::Config>::DataProvider;
|
||||
}
|
||||
|
||||
impl pallet_election_provider_multi_phase::Config for Runtime {
|
||||
type Event = Event;
|
||||
type Currency = Balances;
|
||||
@@ -671,6 +671,8 @@ impl pallet_election_provider_multi_phase::Config for Runtime {
|
||||
type DataProvider = Staking;
|
||||
type Solution = NposSolution16;
|
||||
type Fallback = pallet_election_provider_multi_phase::NoFallback<Self>;
|
||||
type GovernanceFallback =
|
||||
frame_election_provider_support::onchain::OnChainSequentialPhragmen<Self>;
|
||||
type Solver = frame_election_provider_support::SequentialPhragmen<
|
||||
AccountId,
|
||||
pallet_election_provider_multi_phase::SolutionAccuracyOf<Self>,
|
||||
|
||||
Reference in New Issue
Block a user