Add sudo module to polkadot-runtime (#735)

This commit is contained in:
Bastian Köcher
2020-01-07 19:07:54 +01:00
committed by Gavin Wood
parent 0d055c9640
commit 263dc43da3
4 changed files with 34 additions and 2 deletions
+8 -2
View File
@@ -217,6 +217,9 @@ fn staging_testnet_config_genesis() -> polkadot::GenesisConfig {
claims: Some(polkadot::ClaimsConfig {
claims: vec![],
vesting: vec![],
}),
sudo: Some(polkadot::SudoConfig {
key: endowed_accounts[0].clone(),
})
}
}
@@ -275,7 +278,7 @@ pub fn get_authority_keys_from_seed(seed: &str) -> (
/// Helper function to create GenesisConfig for testing
pub fn testnet_genesis(
initial_authorities: Vec<(AccountId, AccountId, BabeId, GrandpaId, ImOnlineId, ValidatorId, AuthorityDiscoveryId)>,
_root_key: AccountId,
root_key: AccountId,
endowed_accounts: Option<Vec<AccountId>>,
) -> polkadot::GenesisConfig {
let endowed_accounts: Vec<AccountId> = endowed_accounts.unwrap_or_else(|| {
@@ -354,7 +357,10 @@ pub fn testnet_genesis(
claims: Some(polkadot::ClaimsConfig {
claims: vec![],
vesting: vec![],
})
}),
sudo: Some(polkadot::SudoConfig {
key: root_key,
}),
}
}