mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-06-13 10:31:04 +00:00
Incorporate the new electing/electable naming into the code (#10956)
* Incorporate the new electing/electable naming into the code * Update frame/election-provider-support/src/lib.rs Co-authored-by: Zeke Mostov <z.mostov@gmail.com> * Update frame/election-provider-support/src/lib.rs Co-authored-by: Zeke Mostov <z.mostov@gmail.com> * Some additional changes * fmt * update codec * revert lock file to master * fix doc test Co-authored-by: Zeke Mostov <z.mostov@gmail.com>
This commit is contained in:
@@ -860,7 +860,7 @@ impl<T: Config> ElectionDataProvider for Pallet<T> {
|
||||
Ok(Self::validator_count())
|
||||
}
|
||||
|
||||
fn voters(maybe_max_len: Option<usize>) -> data_provider::Result<Vec<VoterOf<Self>>> {
|
||||
fn electing_voters(maybe_max_len: Option<usize>) -> data_provider::Result<Vec<VoterOf<Self>>> {
|
||||
// This can never fail -- if `maybe_max_len` is `Some(_)` we handle it.
|
||||
let voters = Self::get_npos_voters(maybe_max_len);
|
||||
debug_assert!(maybe_max_len.map_or(true, |max| voters.len() <= max));
|
||||
@@ -868,7 +868,7 @@ impl<T: Config> ElectionDataProvider for Pallet<T> {
|
||||
Ok(voters)
|
||||
}
|
||||
|
||||
fn targets(maybe_max_len: Option<usize>) -> data_provider::Result<Vec<T::AccountId>> {
|
||||
fn electable_targets(maybe_max_len: Option<usize>) -> data_provider::Result<Vec<T::AccountId>> {
|
||||
let target_count = Validators::<T>::count();
|
||||
|
||||
// We can't handle this case yet -- return an error.
|
||||
|
||||
Reference in New Issue
Block a user