mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-04-26 15:47:58 +00:00
[Fix] Get target count from TargetList instead of storage (#12748)
Co-authored-by: parity-processbot <>
This commit is contained in:
@@ -948,7 +948,7 @@ impl<T: Config> ElectionDataProvider for Pallet<T> {
|
||||
}
|
||||
|
||||
fn electable_targets(maybe_max_len: Option<usize>) -> data_provider::Result<Vec<T::AccountId>> {
|
||||
let target_count = Validators::<T>::count();
|
||||
let target_count = T::TargetList::count();
|
||||
|
||||
// We can't handle this case yet -- return an error.
|
||||
if maybe_max_len.map_or(false, |max_len| target_count > max_len as u32) {
|
||||
|
||||
Reference in New Issue
Block a user