runtime: fix the session keys migration that includes the beefy key type (#2855)

Co-authored-by: Andronik Ordian <write@reusable.software>
This commit is contained in:
André Silva
2021-04-08 20:51:46 +01:00
committed by GitHub
parent cfb8dfa4fe
commit 68626198f8
3 changed files with 29 additions and 17 deletions
+1 -8
View File
@@ -299,14 +299,7 @@ fn transform_session_keys(v: AccountId, old: OldSessionKeys) -> SessionKeys {
para_validator: old.para_validator,
para_assignment: old.para_assignment,
authority_discovery: old.authority_discovery,
beefy: {
// We need to produce a dummy value that's unique for the validator.
let mut id = BeefyId::default();
let id_raw: &mut [u8] = id.as_mut();
id_raw.copy_from_slice(v.as_ref());
id_raw[0..4].copy_from_slice(b"beef");
id
},
beefy: runtime_common::dummy_beefy_id_from_account_id(v),
}
}