Skip to content

Commit

Permalink
fix: Add core percentage in genesis for starlight
Browse files Browse the repository at this point in the history
  • Loading branch information
ParthDesai committed Sep 11, 2024
1 parent a0544d3 commit 465ad1b
Showing 1 changed file with 16 additions and 1 deletion.
17 changes: 16 additions & 1 deletion solo-chains/runtime/starlight/src/genesis_config_presets.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@

//! Genesis configs presets for the Starlight runtime

use pallet_configuration::HostConfiguration;
use sp_arithmetic::Perbill;
#[cfg(not(feature = "std"))]
use sp_std::alloc::format;
use {
Expand Down Expand Up @@ -230,6 +232,7 @@ fn starlight_testnet_genesis(
endowed_accounts: Option<Vec<AccountId>>,
container_chains: Vec<(ParaId, ContainerChainGenesisData, Vec<Vec<u8>>)>,
invulnerables: Vec<String>,
host_configuration: HostConfiguration,
) -> serde_json::Value {
let endowed_accounts: Vec<AccountId> = endowed_accounts.unwrap_or_else(testnet_accounts);
let invulnerable_keys: Vec<_> = invulnerables
Expand Down Expand Up @@ -387,7 +390,11 @@ fn starlight_testnet_genesis(
"dataPreservers": crate::DataPreserversConfig {
bootnodes: data_preservers_bootnodes,
..Default::default()
},
},
"collatorConfiguration": crate::CollatorConfigurationConfig {
config: host_configuration,
..Default::default()
}
})
}

Expand Down Expand Up @@ -649,6 +656,10 @@ pub fn starlight_development_config_genesis(
None,
container_chains,
invulnerables,
HostConfiguration {
max_parachain_cores_percentage: Some(Perbill::from_percent(60)),
..Default::default()
},
)
}

Expand All @@ -666,6 +677,10 @@ pub fn starlight_local_testnet_genesis(
None,
container_chains,
invulnerables,
HostConfiguration {
max_parachain_cores_percentage: Some(Perbill::from_percent(60)),
..Default::default()
},
)
}

Expand Down

0 comments on commit 465ad1b

Please sign in to comment.