mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-06-20 15:11:02 +00:00
committed by
GitHub
parent
cac9d85cb3
commit
fcfb766366
@@ -19,11 +19,11 @@
|
||||
//!
|
||||
//! A semi-sorted list, where items hold an `AccountId` based on some `VoteWeight`. The `AccountId`
|
||||
//! (`id` for short) might be synonym to a `voter` or `nominator` in some context, and `VoteWeight`
|
||||
//! signifies the chance of each id being included in the final [`VoteWeightProvider::iter`].
|
||||
//! signifies the chance of each id being included in the final [`SortedListProvider::iter`].
|
||||
//!
|
||||
//! It implements [`sp_election_provider_support::SortedListProvider`] to provide a semi-sorted list
|
||||
//! of accounts to another pallet. It needs some other pallet to give it some information about the
|
||||
//! weights of accounts via [`sp_election_provider_support::VoteWeightProvider`].
|
||||
//! It implements [`frame_election_provider_support::SortedListProvider`] to provide a semi-sorted
|
||||
//! list of accounts to another pallet. It needs some other pallet to give it some information about
|
||||
//! the weights of accounts via [`frame_election_provider_support::VoteWeightProvider`].
|
||||
//!
|
||||
//! This pallet is not configurable at genesis. Whoever uses it should call appropriate functions of
|
||||
//! the `SortedListProvider` (e.g. `on_insert`, or `regenerate`) at their genesis.
|
||||
@@ -38,7 +38,8 @@
|
||||
//!
|
||||
//! # Details
|
||||
//!
|
||||
//! - items are kept in bags, which are delineated by their range of weight (See [`BagThresholds`]).
|
||||
//! - items are kept in bags, which are delineated by their range of weight (See
|
||||
//! [`Config::BagThresholds`]).
|
||||
//! - for iteration, bags are chained together from highest to lowest and elements within the bag
|
||||
//! are iterated from head to tail.
|
||||
//! - items within a bag are iterated in order of insertion. Thus removing an item and re-inserting
|
||||
|
||||
Reference in New Issue
Block a user