pallet-beefy: ensure mandatory block once per session (#11269)

* pallet-beefy: ensure mandatory block once per session

Signed-off-by: acatangiu <adrian@parity.io>

* pallet-beefy: fix tests with auth changes every session

Signed-off-by: acatangiu <adrian@parity.io>

* Apply suggestions from code review

Co-authored-by: André Silva <123550+andresilva@users.noreply.github.com>

* beefy: fix incorrect skip session metric on node restart

Co-authored-by: André Silva <123550+andresilva@users.noreply.github.com>
This commit is contained in:
Adrian Catangiu
2022-04-28 14:19:32 +03:00
committed by GitHub
parent 21341f35e2
commit 0d73371bb8
5 changed files with 46 additions and 34 deletions
+1 -2
View File
@@ -145,8 +145,7 @@ pub fn new_test_ext_raw_authorities(authorities: Vec<(u64, BeefyId)>) -> TestExt
let session_keys: Vec<_> = authorities
.iter()
.enumerate()
.map(|(_, id)| (id.0 as u64, id.0 as u64, MockSessionKeys { dummy: id.1.clone() }))
.map(|id| (id.0 as u64, id.0 as u64, MockSessionKeys { dummy: id.1.clone() }))
.collect();
BasicExternalities::execute_with_storage(&mut t, || {