mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-05-30 04:41:03 +00:00
Implementing MaxEncodedLen for generate_solution_type (#11032)
* Move `sp-npos-elections-solution-type` to `frame-election-provider-support` First stab at it, will need to amend some more stuff * Fixing tests * Fixing tests * Fixing cargo.toml for std configuration * Implementing `MaxEncodedLen` on `generate_solution_type` * Full implementation of `max_encoded_len` * Fixing implementation bug adding some comments and documentation * fmt * Committing suggested changes renaming, and re exporting macro. * Removing unneeded imports * Implementing `MaxEncodedLen` on `generate_solution_type` * Full implementation of `max_encoded_len` * Fixing implementation bug adding some comments and documentation * Move `NposSolution` to frame * Implementing `MaxEncodedLen` on `generate_solution_type` * Full implementation of `max_encoded_len` * Fixing implementation bug adding some comments and documentation * Fixing test * Removing unneeded dependencies * `VoterSnapshotPerBlock` -> `MaxElectingVoters` * rename `SizeBound` to `MaxVoters` * Removing TODO and change bound * renaming `size_bound` to `max_voters` * Enabling tests for `solution-type` These got dropped off after the crate was moved from `sp_npos_elections` * Adding tests for `MaxEncodedLen` of solution_type * Better rustdocs. Better indenting and comments. Removing unneeded imports in tests.
This commit is contained in:
@@ -70,7 +70,12 @@ pub(crate) type TargetIndex = u16;
|
||||
|
||||
frame_election_provider_support::generate_solution_type!(
|
||||
#[compact]
|
||||
pub struct TestNposSolution::<VoterIndex = VoterIndex, TargetIndex = TargetIndex, Accuracy = PerU16>(16)
|
||||
pub struct TestNposSolution::<
|
||||
VoterIndex = VoterIndex,
|
||||
TargetIndex = TargetIndex,
|
||||
Accuracy = PerU16,
|
||||
MaxVoters = ConstU32::<20>
|
||||
>(16)
|
||||
);
|
||||
|
||||
/// All events of this pallet.
|
||||
|
||||
Reference in New Issue
Block a user