-
Notifications
You must be signed in to change notification settings - Fork 766
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 #6102 #6384
Fix #6102 #6384
Conversation
/cmd prdoc |
.try_fold(PartsOf57600::ZERO, |sum, parts| { | ||
sum.checked_add(parts).ok_or(Error::<T>::OverScheduled) | ||
})?; | ||
ensure!(parts_sum.is_full(), Error::<T>::UnderScheduled); |
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.
What happens if the schedule is split up, but we only receive one message in time? Will it break any assumptions if we don't have the full parts scheduled?
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.
No. I checked, the code does not really care whether the schedule is full or not.
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.
Probably worth a unit test in case this behaviour is changed in future.
Should be very quick to add - just an additional core that is not fully assigned in the test.
.try_fold(PartsOf57600::ZERO, |sum, parts| { | ||
sum.checked_add(parts).ok_or(Error::<T>::OverScheduled) | ||
})?; | ||
ensure!(parts_sum.is_full(), Error::<T>::UnderScheduled); |
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.
Probably worth a unit test in case this behaviour is changed in future.
Should be very quick to add - just an additional core that is not fully assigned in the test.
Relax requirements for
assign_core
so that it accepts updates for the last scheduled entry.Fixes #6102