diff --git a/tpu-client-next/tests/connection_workers_scheduler_test.rs b/tpu-client-next/tests/connection_workers_scheduler_test.rs index 05b7ce9e050783..2b83d0f088a132 100644 --- a/tpu-client-next/tests/connection_workers_scheduler_test.rs +++ b/tpu-client-next/tests/connection_workers_scheduler_test.rs @@ -42,10 +42,10 @@ use { tokio_util::sync::CancellationToken, }; -fn test_config(identity: Option) -> ConnectionWorkersSchedulerConfig { +fn test_config(stake_identity: Option) -> ConnectionWorkersSchedulerConfig { ConnectionWorkersSchedulerConfig { bind: SocketAddr::new(Ipv4Addr::new(127, 0, 0, 1).into(), 0), - stake_identity: identity, + stake_identity, num_connections: 1, skip_check_transaction_age: false, // At the moment we have only one strategy to send transactions: we try @@ -65,7 +65,7 @@ fn test_config(identity: Option) -> ConnectionWorkersSchedulerConfig { async fn setup_connection_worker_scheduler( tpu_address: SocketAddr, transaction_receiver: Receiver, - identity: Option, + stake_identity: Option, ) -> ( JoinHandle>, CancellationToken, @@ -84,7 +84,7 @@ async fn setup_connection_worker_scheduler( .expect("Leader updates was successfully created"); let cancel = CancellationToken::new(); - let config = test_config(identity); + let config = test_config(stake_identity); let scheduler = tokio::spawn(ConnectionWorkersScheduler::run( config, leader_updater, @@ -402,8 +402,8 @@ async fn test_connection_pruned_and_reopened() { /// connection and verify that all the txs has been received. #[tokio::test] async fn test_staked_connection() { - let identity = Keypair::new(); - let stakes = HashMap::from([(identity.pubkey(), 100_000)]); + let stake_identity = Keypair::new(); + let stakes = HashMap::from([(stake_identity.pubkey(), 100_000)]); let staked_nodes = StakedNodes::new(Arc::new(stakes), HashMap::::default()); let SpawnTestServerResult { @@ -434,7 +434,7 @@ async fn test_staked_connection() { } = spawn_tx_sender(tx_size, expected_num_txs, Duration::from_millis(100)); let (scheduler_handle, _scheduler_cancel) = - setup_connection_worker_scheduler(server_address, tx_receiver, Some(identity)).await; + setup_connection_worker_scheduler(server_address, tx_receiver, Some(stake_identity)).await; // Check results let actual_num_packets = count_received_packets_for(receiver, tx_size, TEST_MAX_TIME).await;