From 1fab40d9ae0535cd8510c86252760e83a8965d13 Mon Sep 17 00:00:00 2001 From: "mergify[bot]" <37929162+mergify[bot]@users.noreply.github.com> Date: Mon, 8 Jul 2024 10:33:50 -0600 Subject: [PATCH] v1.18: Deprecate RpcRequest::GetStakeActivation (backport of #2005) (#2012) Deprecate RpcRequest::GetStakeActivation (#2005) * Correct deprecation note * Deprecate rpc-client-api request (cherry picked from commit 0deb6fb3f2022fd56a4457a2bb03c49146af90d4) Co-authored-by: Tyera --- rpc-client-api/src/request.rs | 4 ++++ rpc-client/src/nonblocking/rpc_client.rs | 5 +++-- rpc-client/src/rpc_client.rs | 4 ++-- 3 files changed, 9 insertions(+), 4 deletions(-) diff --git a/rpc-client-api/src/request.rs b/rpc-client-api/src/request.rs index e9c6ef9b388cae..78e25ac829f880 100644 --- a/rpc-client-api/src/request.rs +++ b/rpc-client-api/src/request.rs @@ -94,6 +94,10 @@ pub enum RpcRequest { GetStorageTurn, GetStorageTurnRate, GetSlotsPerSegment, + #[deprecated( + since = "1.18.18", + note = "Do not use; getStakeActivation is not supported by the JSON-RPC server." + )] GetStakeActivation, GetStakeMinimumDelegation, GetStoragePubkeysForSlot, diff --git a/rpc-client/src/nonblocking/rpc_client.rs b/rpc-client/src/nonblocking/rpc_client.rs index 13e8dc624d476c..29a9d8a2ed21c1 100644 --- a/rpc-client/src/nonblocking/rpc_client.rs +++ b/rpc-client/src/nonblocking/rpc_client.rs @@ -2152,10 +2152,11 @@ impl RpcClient { /// ``` #[deprecated( since = "1.18.18", - note = "Do not use; getStakeActivation is deprecated on the JSON-RPC server. Please use \ - the stake account and StakeHistory sysvar to call \ + note = "Do not use; getStakeActivation is not supported by the JSON-RPC server. Please \ + use the stake account and StakeHistory sysvar to call \ `Delegation::stake_activating_and_deactivating()` instead" )] + #[allow(deprecated)] pub async fn get_stake_activation( &self, stake_account: Pubkey, diff --git a/rpc-client/src/rpc_client.rs b/rpc-client/src/rpc_client.rs index bf5848f6e7a607..04359578b614c4 100644 --- a/rpc-client/src/rpc_client.rs +++ b/rpc-client/src/rpc_client.rs @@ -1790,8 +1790,8 @@ impl RpcClient { /// ``` #[deprecated( since = "1.18.18", - note = "Do not use; getStakeActivation is deprecated on the JSON-RPC server. Please use \ - the stake account and StakeHistory sysvar to call \ + note = "Do not use; getStakeActivation is not supported by the JSON-RPC server. Please \ + use the stake account and StakeHistory sysvar to call \ `Delegation::stake_activating_and_deactivating()` instead" )] #[allow(deprecated)]