Cumulus test service cleanup (#2887)

closes #2567 

Followup for https://github.com/paritytech/polkadot-sdk/pull/2331

This PR contains multiple internal cleanups:

1. This gets rid of the functionality in `generate_genesis_block` which
was only used in one benchmark
2. Fixed `transaction_pool` and `transaction_throughput` benchmarks
failing since they require a tokio runtime now.
3. Removed `parachain_id` CLI option from the test parachain
4. Removed `expect` call from `RuntimeResolver`
This commit is contained in:
Sebastian Kunert
2024-01-11 17:44:03 +01:00
committed by GitHub
parent f270b08a48
commit c93f5aba8a
8 changed files with 70 additions and 135 deletions
+2 -6
View File
@@ -38,9 +38,6 @@ pub struct TestCollatorCli {
#[command(flatten)]
pub run: cumulus_client_cli::RunCmd,
#[arg(default_value_t = 2000u32)]
pub parachain_id: u32,
/// Relay chain arguments
#[arg(raw = true)]
pub relaychain_args: Vec<String>,
@@ -256,9 +253,8 @@ impl SubstrateCli for TestCollatorCli {
fn load_spec(&self, id: &str) -> std::result::Result<Box<dyn sc_service::ChainSpec>, String> {
Ok(match id {
"" => Box::new(cumulus_test_service::get_chain_spec(Some(ParaId::from(
self.parachain_id,
)))) as Box<_>,
"" =>
Box::new(cumulus_test_service::get_chain_spec(Some(ParaId::from(2000)))) as Box<_>,
path => {
let chain_spec =
cumulus_test_service::chain_spec::ChainSpec::from_json_file(path.into())?;