Fix run_to_block functions (#2258)

This commit is contained in:
Sergei Shulepov
2021-01-12 22:45:11 +01:00
committed by GitHub
parent b4ff601500
commit d99dbc496c
5 changed files with 24 additions and 24 deletions
+6 -6
View File
@@ -280,7 +280,7 @@ decl_storage! {
// NOTE that this field is used by parachains via merkle storage proofs, therefore changing
// the format will require migration of parachains.
HrmpEgressChannelsIndex: map hasher(twox_64_concat) ParaId => Vec<ParaId>;
/// Storage for the messages for each channel.
/// Invariant: cannot be non-empty if the corresponding channel in `HrmpChannels` is `None`.
HrmpChannelContents: map hasher(twox_64_concat) HrmpChannelId => Vec<InboundHrmpMessage<T::BlockNumber>>;
@@ -1101,17 +1101,17 @@ mod tests {
Hrmp::initializer_finalize();
Paras::initializer_finalize();
System::on_finalize(b);
System::on_initialize(b + 1);
System::set_block_number(b + 1);
if new_session.as_ref().map_or(false, |v| v.contains(&(b + 1))) {
// NOTE: this is in initialization order.
Paras::initializer_on_new_session(&Default::default());
Hrmp::initializer_on_new_session(&Default::default());
}
System::on_finalize(b);
System::on_initialize(b + 1);
System::set_block_number(b + 1);
// NOTE: this is in initialization order.
Paras::initializer_initialize(b + 1);
Hrmp::initializer_initialize(b + 1);