Skip to content
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions prdoc/pr_10880.prdoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
title: remove invalid voter count assertion due to PendingRebag
doc:
- audience: Runtime Dev
description: |-
Refers to: #10687

This PR comments out the section where the error occurs due to the implementation of `PendingRebag` (#9725). This change resolves the issue but may lead to a misalignment where the VoterList count no longer matches the sum of Nominations and Validators.
crates:
- name: pallet-staking-async
bump: patch
13 changes: 7 additions & 6 deletions substrate/frame/staking-async/src/pallet/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1039,12 +1039,13 @@ pub mod pallet {
}
}

// all voters are reported to the `VoterList`.
assert_eq!(
T::VoterList::count(),
Nominators::<T>::count() + Validators::<T>::count(),
"not all genesis stakers were inserted into sorted list provider, something is wrong."
);
// Due to `PendingRebag`, the bags-list may temporarily lag behind the true
// voter set in `pallet-staking`, making such an assertion invalid.
// assert_eq!(
// T::VoterList::count(),
// Nominators::<T>::count() + Validators::<T>::count(),
// "not all genesis stakers were inserted into sorted list provider, something is
// wrong." );

// now generate the dev stakers, after all else is setup
if let Some((validators, nominators)) = self.dev_stakers {
Expand Down
Loading