From 1f3917a26cc92682a0fd64e91a2bb7918e7186f9 Mon Sep 17 00:00:00 2001 From: "mergify[bot]" <37929162+mergify[bot]@users.noreply.github.com> Date: Mon, 11 Mar 2024 15:57:46 -0400 Subject: [PATCH] v1.18: deprecate `get_client` and `get_multi_client` (backport of #177) (#182) * deprecate `get_client` and `get_multi_client` (#177) deprecate get_client and get_multi_client (cherry picked from commit 00c984fe4decfd8da1f08d6d756f3c98a3827acc) * bump deprecated version numbers --------- Co-authored-by: Greg Cusack --- bench-tps/src/main.rs | 1 + dos/src/main.rs | 1 + gossip/src/gossip_service.rs | 2 ++ 3 files changed, 4 insertions(+) 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/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..b4a24033257ad6 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.6", 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.6", note = "Will be removed in favor of get_client")] pub fn get_multi_client( nodes: &[ContactInfo], socket_addr_space: &SocketAddrSpace,