From 9eb34f263c2f059a865dc288ed0be55d12a8b832 Mon Sep 17 00:00:00 2001 From: greg Date: Thu, 29 Feb 2024 02:11:59 +0000 Subject: [PATCH] clean up --- bench-tps/Cargo.toml | 2 +- bench-tps/tests/bench_tps.rs | 36 +++++++++++++++++++----------------- 2 files changed, 20 insertions(+), 18 deletions(-) diff --git a/bench-tps/Cargo.toml b/bench-tps/Cargo.toml index f2839f86984f2d..cd40eb1c833c1c 100644 --- a/bench-tps/Cargo.toml +++ b/bench-tps/Cargo.toml @@ -35,8 +35,8 @@ solana-rpc-client-nonce-utils = { workspace = true } solana-runtime = { workspace = true } solana-sdk = { workspace = true } solana-streamer = { workspace = true } -solana-tpu-client = { workspace = true } solana-thin-client = { workspace = true } +solana-tpu-client = { workspace = true } solana-version = { workspace = true } spl-instruction-padding = { workspace = true } thiserror = { workspace = true } diff --git a/bench-tps/tests/bench_tps.rs b/bench-tps/tests/bench_tps.rs index 2a48fded9c820c..40730fd3fb0ac0 100644 --- a/bench-tps/tests/bench_tps.rs +++ b/bench-tps/tests/bench_tps.rs @@ -55,24 +55,26 @@ fn test_bench_tps_local_cluster(config: Config) { let faucet_addr = run_local_faucet(faucet_keypair, None); const NUM_NODES: usize = 1; - let mut cluster_config = ClusterConfig { - node_stakes: vec![999_990; NUM_NODES], - cluster_lamports: 200_000_000, - validator_configs: make_identical_validator_configs( - &ValidatorConfig { - rpc_config: JsonRpcConfig { - faucet_addr: Some(faucet_addr), - ..JsonRpcConfig::default_for_test() + let cluster = LocalCluster::new( + &mut ClusterConfig { + node_stakes: vec![999_990; NUM_NODES], + cluster_lamports: 200_000_000, + validator_configs: make_identical_validator_configs( + &ValidatorConfig { + rpc_config: JsonRpcConfig { + faucet_addr: Some(faucet_addr), + ..JsonRpcConfig::default_for_test() + }, + ..ValidatorConfig::default_for_test() }, - ..ValidatorConfig::default_for_test() - }, - NUM_NODES, - ), - native_instruction_processors, - additional_accounts, - ..ClusterConfig::default() - }; - let cluster = LocalCluster::new(&mut cluster_config, SocketAddrSpace::Unspecified); + NUM_NODES, + ), + native_instruction_processors, + additional_accounts, + ..ClusterConfig::default() + }, + SocketAddrSpace::Unspecified, + ); cluster.transfer(&cluster.funding_keypair, &faucet_pubkey, 100_000_000);