This repository has been archived by the owner on Nov 15, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 2.6k
Better prime election. #6939
Merged
Merged
Better prime election. #6939
Changes from 2 commits
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
5b6c416
Better prime election.
kianenigma ec00177
improve docs
shawntabrizi 0a64a85
more sensible variable names
shawntabrizi 576c1c9
link to Borda count wiki
shawntabrizi f350b62
Merge branch 'master' of github.com:paritytech/substrate into kiz-saf…
kianenigma c6bc3d8
Merge branch 'kiz-safe-prime-election' of github.com:paritytech/subst…
kianenigma File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Re-iterating could be heavy. Would imply we need to re-do weights. Also, could we not just re-use
voters_and_stakes
perhaps convertingn thestake
item back to its original type?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Weight of this is already maximum of the block, can't get any worse.
This is practically what we are doing. second iter is in-memory and won't go into storage again.
.cloned()
is inevitable because we need to passvoters_and_votes
by value toseq_phragmen
.