@@ -36,8 +36,8 @@ use sp_runtime::{
3636} ;
3737use tangle_primitives:: types:: { BlockNumber , Signature } ;
3838use tangle_runtime:: {
39- AccountId , Balance , MaxVestingSchedules , Perbill , Precompiles , StakerStatus , TreasuryPalletId ,
40- UNIT , WASM_BINARY ,
39+ AccountId , Balance , MaxVestingSchedules , Perbill , Precompiles , RoleKeyId , StakerStatus ,
40+ TreasuryPalletId , UNIT , WASM_BINARY ,
4141} ;
4242
4343/// Specialized `ChainSpec`. This is a specialization of the general Substrate ChainSpec type.
@@ -61,12 +61,15 @@ where
6161}
6262
6363/// Generate an babe authority key.
64- pub fn authority_keys_from_seed ( stash : & str ) -> ( AccountId , BabeId , GrandpaId , ImOnlineId ) {
64+ pub fn authority_keys_from_seed (
65+ stash : & str ,
66+ ) -> ( AccountId , BabeId , GrandpaId , ImOnlineId , RoleKeyId ) {
6567 (
6668 get_account_id_from_seed :: < sr25519:: Public > ( stash) ,
6769 get_from_seed :: < BabeId > ( stash) ,
6870 get_from_seed :: < GrandpaId > ( stash) ,
6971 get_from_seed :: < ImOnlineId > ( stash) ,
72+ get_from_seed :: < RoleKeyId > ( stash) ,
7073 )
7174}
7275
@@ -78,8 +81,9 @@ fn generate_session_keys(
7881 babe : BabeId ,
7982 grandpa : GrandpaId ,
8083 im_online : ImOnlineId ,
84+ role : RoleKeyId ,
8185) -> tangle_runtime:: opaque:: SessionKeys {
82- tangle_runtime:: opaque:: SessionKeys { babe, grandpa, im_online }
86+ tangle_runtime:: opaque:: SessionKeys { babe, grandpa, im_online, role }
8387}
8488
8589pub fn local_mainnet_config ( chain_id : u64 ) -> Result < ChainSpec , String > {
@@ -170,7 +174,7 @@ pub fn tangle_mainnet_config(chain_id: u64) -> Result<ChainSpec, String> {
170174
171175#[ allow( clippy:: too_many_arguments) ]
172176fn mainnet_genesis (
173- initial_authorities : Vec < ( AccountId , BabeId , GrandpaId , ImOnlineId ) > ,
177+ initial_authorities : Vec < ( AccountId , BabeId , GrandpaId , ImOnlineId , RoleKeyId ) > ,
174178 endowed_accounts : Vec < ( AccountId , Balance ) > ,
175179 root_key : AccountId ,
176180 chain_id : u64 ,
@@ -249,7 +253,7 @@ fn mainnet_genesis(
249253 (
250254 x. 0 . clone( ) ,
251255 x. 0 . clone( ) ,
252- generate_session_keys( x. 1 . clone( ) , x. 2 . clone( ) , x. 3 . clone( ) ) ,
256+ generate_session_keys( x. 1 . clone( ) , x. 2 . clone( ) , x. 3 . clone( ) , x . 4 . clone ( ) ) ,
253257 )
254258 } )
255259 . collect:: <Vec <_>>( )
0 commit comments