reset events before apply runtime upgrade (#10620)

* reset events before apply runtime upgrade

* fix tests

* add test

* update comment

* Update frame/system/src/lib.rs

* trigger CI

Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com>
This commit is contained in:
Xiliang Chen
2022-01-12 21:22:29 +13:00
committed by GitHub
parent 79cab81364
commit d346028a9d
11 changed files with 79 additions and 83 deletions
@@ -239,7 +239,8 @@ mod tests {
let mut parent_hash = System::parent_hash();
for i in 1..(blocks + 1) {
System::initialize(&i, &parent_hash, &Default::default(), frame_system::InitKind::Full);
System::reset_events();
System::initialize(&i, &parent_hash, &Default::default());
CollectiveFlip::on_initialize(i);
let header = System::finalize();