-
Notifications
You must be signed in to change notification settings - Fork 710
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix claim queue size #6257
fix claim queue size #6257
Conversation
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.
LGTM, just some suggestions.
@@ -203,6 +204,12 @@ impl<T: Config> Pallet<T> { | |||
ValidatorGroups::<T>::decode_len().unwrap_or(0) | |||
} | |||
|
|||
/// Expected claim queue len. Can be different than the real length if for example we don't have | |||
/// assignments for a core. |
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.
claim_queue_len
is a bit confusing as usually we mean by length of the claim queue the length of individual queues.
If we want to name it with regrads to claim queue, maybe claim_queue_cores
?
Reported in #6161 (comment)
Fixes a bug introduced in #5461, where the claim queue would contain entries even if the validator groups storage is empty (which happens during the first session).
This PR sets the claim queue core count to be the minimum between the num_cores param and the number of validator groups
TODO: