From 15328bf55b2c9c23fc0ba7e40ff1a6044a6fb316 Mon Sep 17 00:00:00 2001 From: Greg Cusack Date: Mon, 11 Mar 2024 13:13:56 -0400 Subject: [PATCH 1/2] deprecate `get_client` and `get_multi_client` (#177) deprecate get_client and get_multi_client (cherry picked from commit 00c984fe4decfd8da1f08d6d756f3c98a3827acc) --- dos/src/main.rs | 1 + gossip/src/gossip_service.rs | 2 ++ 2 files changed, 3 insertions(+) diff --git a/dos/src/main.rs b/dos/src/main.rs index 8e6c3c5b2b11b5..b9e0dceba40bf0 100644 --- a/dos/src/main.rs +++ b/dos/src/main.rs @@ -39,6 +39,7 @@ //! ``` //! #![allow(clippy::arithmetic_side_effects)] +#![allow(deprecated)] use { crossbeam_channel::{select, tick, unbounded, Receiver, Sender}, itertools::Itertools, diff --git a/gossip/src/gossip_service.rs b/gossip/src/gossip_service.rs index b587a5e0672421..0a64792b7e98f4 100644 --- a/gossip/src/gossip_service.rs +++ b/gossip/src/gossip_service.rs @@ -193,6 +193,7 @@ pub fn discover( } /// Creates a ThinClient by selecting a valid node at random +#[deprecated(since = "1.18.0", note = "Interface will change")] pub fn get_client( nodes: &[ContactInfo], socket_addr_space: &SocketAddrSpace, @@ -208,6 +209,7 @@ pub fn get_client( ThinClient::new(rpc, tpu, connection_cache) } +#[deprecated(since = "1.18.0", note = "Will be removed in favor of get_client")] pub fn get_multi_client( nodes: &[ContactInfo], socket_addr_space: &SocketAddrSpace, From d8434f312830b30312888f80ff6900734a9d1c95 Mon Sep 17 00:00:00 2001 From: greg Date: Mon, 11 Mar 2024 17:33:28 +0000 Subject: [PATCH 2/2] bump deprecated version numbers --- bench-tps/src/main.rs | 1 + gossip/src/gossip_service.rs | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/bench-tps/src/main.rs b/bench-tps/src/main.rs index 519612bd4237a7..ad2fdfcc5a7fbb 100644 --- a/bench-tps/src/main.rs +++ b/bench-tps/src/main.rs @@ -1,4 +1,5 @@ #![allow(clippy::arithmetic_side_effects)] +#![allow(deprecated)] use { clap::value_t, log::*, diff --git a/gossip/src/gossip_service.rs b/gossip/src/gossip_service.rs index 0a64792b7e98f4..b4a24033257ad6 100644 --- a/gossip/src/gossip_service.rs +++ b/gossip/src/gossip_service.rs @@ -193,7 +193,7 @@ pub fn discover( } /// Creates a ThinClient by selecting a valid node at random -#[deprecated(since = "1.18.0", note = "Interface will change")] +#[deprecated(since = "1.18.6", note = "Interface will change")] pub fn get_client( nodes: &[ContactInfo], socket_addr_space: &SocketAddrSpace, @@ -209,7 +209,7 @@ pub fn get_client( ThinClient::new(rpc, tpu, connection_cache) } -#[deprecated(since = "1.18.0", note = "Will be removed in favor of get_client")] +#[deprecated(since = "1.18.6", note = "Will be removed in favor of get_client")] pub fn get_multi_client( nodes: &[ContactInfo], socket_addr_space: &SocketAddrSpace,