Adds consistency checks for the HostConfiguration (#2087)

* Adds consistency checks for the `HostConfiguration`

Besides that it fixes the chain specs to make the consistency checks happy.

* Update runtime/parachains/src/configuration.rs

Co-authored-by: Shawn Tabrizi <shawntabrizi@gmail.com>

* Review feedback and test fixes etc

* Update

* More

* I'm an idiot

* Fix tests...

Co-authored-by: Shawn Tabrizi <shawntabrizi@gmail.com>
This commit is contained in:
Bastian Köcher
2020-12-08 16:05:00 +01:00
committed by GitHub
parent f28333aedb
commit 575d68a65d
8 changed files with 137 additions and 140 deletions
@@ -26,7 +26,6 @@ use primitives::v1::{
GroupIndex, CandidateEvent, PersistedValidationData, SessionInfo,
InboundDownwardMessage, InboundHrmpMessage,
};
use sp_runtime::traits::Zero;
use frame_support::debug;
use crate::{initializer, inclusion, scheduler, configuration, paras, session_info, dmp, hrmp};
@@ -57,10 +56,6 @@ pub fn availability_cores<T: initializer::Config>() -> Vec<CoreState<T::BlockNum
let time_out_at = |backed_in_number, availability_period| {
let time_out_at = backed_in_number + availability_period;
if rotation_info.group_rotation_frequency == Zero::zero() {
return time_out_at;
}
let current_window = rotation_info.last_rotation_at() + availability_period;
let next_rotation = rotation_info.next_rotation_at();