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
@@ -55,7 +55,7 @@ fn new_node(tokio_handle: Handle) -> node_cli::service::NewFullBase {
impl_name: "BenchmarkImpl".into(),
impl_version: "1.0".into(),
role: Role::Authority,
tokio_handle,
tokio_handle: tokio_handle.clone(),
transaction_pool: TransactionPoolOptions {
ready: PoolLimit { count: 100_000, total_bytes: 100 * 1024 * 1024 },
future: PoolLimit { count: 100_000, total_bytes: 100 * 1024 * 1024 },
@@ -97,7 +97,9 @@ fn new_node(tokio_handle: Handle) -> node_cli::service::NewFullBase {
wasm_runtime_overrides: None,
};
node_cli::service::new_full_base(config, None, false, |_, _| ()).expect("Creates node")
tokio_handle.block_on(async move {
node_cli::service::new_full_base(config, None, false, |_, _| ()).expect("Creates node")
})
}
fn create_accounts(num: usize) -> Vec<sr25519::Pair> {