Skip to content

Commit

Permalink
Cumulus test service cleanup (paritytech#2887)
Browse files Browse the repository at this point in the history
closes paritytech#2567 

Followup for paritytech#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`
  • Loading branch information
skunert authored Jan 11, 2024
1 parent 5013dab commit 7b10947
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions substrate/bin/node/cli/benches/transaction_pool.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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 },
Expand Down Expand Up @@ -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> {
Expand Down

0 comments on commit 7b10947

Please sign in to comment.