mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-04-26 19:17:58 +00:00
Enable two phase election provider in runtimes in 'DryRun' mode (#2476)
* Apply some changes * Make the runtimes build * Master.into() * Undo branch updates. * Undo unwatned changes * Fix deps one last time * Fix election lookahead * Revert deps * Fix :P Co-authored-by: Bastian Köcher <info@kchr.de>
This commit is contained in:
@@ -26,6 +26,7 @@ sp-staking = { git = "https://github.com/paritytech/substrate", branch = "master
|
||||
sp-core = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false }
|
||||
sp-session = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false }
|
||||
sp-version = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false }
|
||||
sp-election-providers = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false }
|
||||
tx-pool-api = { package = "sp-transaction-pool", git = "https://github.com/paritytech/substrate", branch = "master", default-features = false }
|
||||
block-builder-api = { package = "sp-block-builder", git = "https://github.com/paritytech/substrate", branch = "master", default-features = false }
|
||||
|
||||
@@ -114,4 +115,5 @@ std = [
|
||||
"sp-session/std",
|
||||
"pallet-randomness-collective-flip/std",
|
||||
"runtime-common/std",
|
||||
"sp-election-providers/std",
|
||||
]
|
||||
|
||||
@@ -310,6 +310,13 @@ parameter_types! {
|
||||
pub MinSolutionScoreBump: Perbill = Perbill::from_rational_approximation(5u32, 10_000);
|
||||
}
|
||||
|
||||
impl sp_election_providers::onchain::Config for Runtime {
|
||||
type AccountId = <Self as frame_system::Config>::AccountId;
|
||||
type BlockNumber = <Self as frame_system::Config>::BlockNumber;
|
||||
type Accuracy = sp_runtime::Perbill;
|
||||
type DataProvider = pallet_staking::Module<Self>;
|
||||
}
|
||||
|
||||
impl pallet_staking::Config for Runtime {
|
||||
type Currency = Balances;
|
||||
type UnixTime = Timestamp;
|
||||
@@ -333,6 +340,7 @@ impl pallet_staking::Config for Runtime {
|
||||
type MaxIterations = MaxIterations;
|
||||
type OffchainSolutionWeightLimit = ();
|
||||
type MinSolutionScoreBump = MinSolutionScoreBump;
|
||||
type ElectionProvider = sp_election_providers::onchain::OnChainSequentialPhragmen<Self>;
|
||||
type WeightInfo = ();
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user