Skip to content

Commit

Permalink
Companion for Multi-phase elections solution resubmission (#2648)
Browse files Browse the repository at this point in the history
* Companion for Multi-phase elections solution resubmission

paritytech/substrate#8290

* update Substrate

Co-authored-by: parity-processbot <>
  • Loading branch information
coriolinus authored May 3, 2021
1 parent e69bcc1 commit c9e63f1
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
4 changes: 3 additions & 1 deletion relay/kusama/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -346,6 +346,7 @@ parameter_types! {

// miner configs
pub const MinerMaxIterations: u32 = 10;
pub OffchainRepeat: BlockNumber = 5;
}

sp_npos_elections::generate_solution_type!(
Expand All @@ -364,8 +365,9 @@ impl pallet_election_provider_multi_phase::Config for Runtime {
type UnsignedPhase = UnsignedPhase;
type SolutionImprovementThreshold = SolutionImprovementThreshold;
type MinerMaxIterations = MinerMaxIterations;
type MinerMaxWeight = OffchainSolutionWeightLimit;
type MinerMaxWeight = OffchainSolutionWeightLimit; // For now use the one from staking.
type MinerMaxLength = OffchainSolutionLengthLimit;
type OffchainRepeat = OffchainRepeat;
type MinerTxPriority = NposSolutionPriority;
type DataProvider = Staking;
type OnChainAccuracy = Perbill;
Expand Down
4 changes: 3 additions & 1 deletion relay/polkadot/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -331,6 +331,7 @@ parameter_types! {

// miner configs
pub const MinerMaxIterations: u32 = 10;
pub OffchainRepeat: BlockNumber = 5;
}

sp_npos_elections::generate_solution_type!(
Expand All @@ -349,8 +350,9 @@ impl pallet_election_provider_multi_phase::Config for Runtime {
type UnsignedPhase = UnsignedPhase;
type SolutionImprovementThreshold = SolutionImprovementThreshold;
type MinerMaxIterations = MinerMaxIterations;
type MinerMaxWeight = OffchainSolutionWeightLimit;
type MinerMaxWeight = OffchainSolutionWeightLimit; // For now use the one from staking.
type MinerMaxLength = OffchainSolutionLengthLimit;
type OffchainRepeat = OffchainRepeat;
type MinerTxPriority = NposSolutionPriority;
type DataProvider = Staking;
type OnChainAccuracy = Perbill;
Expand Down

0 comments on commit c9e63f1

Please sign in to comment.