Skip to content

Commit

Permalink
v1.18: Deprecate RpcRequest::GetStakeActivation (backport of solana-l…
Browse files Browse the repository at this point in the history
…abs#2005) (solana-labs#2012)

Deprecate RpcRequest::GetStakeActivation (solana-labs#2005)

* Correct deprecation note

* Deprecate rpc-client-api request

(cherry picked from commit 0deb6fb)

Co-authored-by: Tyera <[email protected]>
  • Loading branch information
2 people authored and willhickey committed Jul 10, 2024
1 parent 5dada73 commit 8304713
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 4 deletions.
4 changes: 4 additions & 0 deletions rpc-client-api/src/request.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
5 changes: 3 additions & 2 deletions rpc-client/src/nonblocking/rpc_client.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
4 changes: 2 additions & 2 deletions rpc-client/src/rpc_client.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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)]
Expand Down

0 comments on commit 8304713

Please sign in to comment.