Companion to Implementing MaxEncodedLen for generate_solution_type #11032 (#5145)

* Fixing `generate_solution_type`
This is needed after changes to substrate

* `VoterSnapshotPerBlock` -> `MaxElectingVoters`

* rename `SizeBound` to `MaxVoters`

* cargo update -p sp-io

* ignore failing test

* spell-check

* fix pub OffchainRepeat

Co-authored-by: kianenigma <kian@parity.io>
Co-authored-by: Kian Paimani <5588131+kianenigma@users.noreply.github.com>
This commit is contained in:
Georges
2022-03-23 13:18:57 +00:00
committed by GitHub
parent 4c346cb44e
commit 1656c4cd02
5 changed files with 181 additions and 168 deletions
+173 -165
View File
File diff suppressed because it is too large Load Diff
+1
View File
@@ -78,6 +78,7 @@ impl TestHost {
}
#[async_std::test]
#[ignore]
async fn terminates_on_timeout() {
let host = TestHost::new();
+3 -1
View File
@@ -405,7 +405,8 @@ parameter_types! {
// 1 hour session, 15 minutes unsigned phase, 8 offchain executions.
pub OffchainRepeat: BlockNumber = UnsignedPhase::get() / 8;
/// We take the top 12_500 nominators as electing voters..
/// We take the top 12500 nominators as electing voters..
pub const MaxElectingVoters: u32 = 12_500;
/// ... and all of the validators as electable targets. Whilst this is the case, we cannot and
/// shall not increase the size of the validator intentions.
@@ -418,6 +419,7 @@ frame_election_provider_support::generate_solution_type!(
VoterIndex = u32,
TargetIndex = u16,
Accuracy = sp_runtime::PerU16,
MaxVoters = MaxElectingVoters,
>(24)
);
+2 -1
View File
@@ -449,7 +449,7 @@ parameter_types! {
// 4 hour session, 1 hour unsigned phase, 32 offchain executions.
pub OffchainRepeat: BlockNumber = UnsignedPhase::get() / 32;
/// We take the top 22_500 nominators as electing voters..
/// We take the top 22500 nominators as electing voters..
pub const MaxElectingVoters: u32 = 22_500;
/// ... and all of the validators as electable targets. Whilst this is the case, we cannot and
/// shall not increase the size of the validator intentions.
@@ -462,6 +462,7 @@ frame_election_provider_support::generate_solution_type!(
VoterIndex = u32,
TargetIndex = u16,
Accuracy = sp_runtime::PerU16,
MaxVoters = MaxElectingVoters,
>(16)
);
+2 -1
View File
@@ -351,7 +351,7 @@ parameter_types! {
// 1 hour session, 15 minutes unsigned phase, 4 offchain executions.
pub OffchainRepeat: BlockNumber = UnsignedPhase::get() / 4;
/// We take the top 22_500 nominators as electing voters..
/// We take the top 22500 nominators as electing voters..
pub const MaxElectingVoters: u32 = 22_500;
/// ... and all of the validators as electable targets. Whilst this is the case, we cannot and
/// shall not increase the size of the validator intentions.
@@ -364,6 +364,7 @@ frame_election_provider_support::generate_solution_type!(
VoterIndex = u32,
TargetIndex = u16,
Accuracy = sp_runtime::PerU16,
MaxVoters = MaxElectingVoters,
>(16)
);