From 8e0224263c9d3c684bf04cb0c626cc5c01e1081e Mon Sep 17 00:00:00 2001 From: Kirill Lykov Date: Thu, 2 Feb 2023 16:41:09 +0100 Subject: [PATCH] update connection cache construction after upstream update --- bench-tps/src/main.rs | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/bench-tps/src/main.rs b/bench-tps/src/main.rs index 0e0b6f93a7b4a5..bc4d604d6cad8c 100644 --- a/bench-tps/src/main.rs +++ b/bench-tps/src/main.rs @@ -50,20 +50,21 @@ fn create_connection_cache( ) -> Arc { match use_quic { true => { - let mut connection_cache = ConnectionCache::new(tpu_connection_pool_size); - connection_cache - .update_client_certificate(client_node_id, bind_address) - .expect("Failed to update QUIC client certificates"); - let staked_nodes = Arc::new(RwLock::new(StakedNodes::default())); - connection_cache.set_staked_nodes(&staked_nodes, &client_node_id.pubkey()); staked_nodes.write().unwrap().total_stake = total_stake; - staked_nodes .write() .unwrap() .pubkey_stake_map .insert(client_node_id.pubkey(), stake); + + let connection_cache = ConnectionCache::new_with_client_options( + tpu_connection_pool_size, + None, + Some((client_node_id, bind_address)), + Some((&staked_nodes, &client_node_id.pubkey())), + ); + Arc::new(connection_cache) } false => Arc::new(ConnectionCache::with_udp(tpu_connection_pool_size)),