Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Deprecate RpcRequest::GetStakeActivation #2005

Merged
merged 2 commits into from
Jul 4, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion rpc-client-api/src/request.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,9 @@ use {

#[derive(Debug, PartialEq, Eq, Hash, Clone, Copy)]
pub enum RpcRequest {
Custom { method: &'static str },
Custom {
method: &'static str,
},
DeregisterNode,
GetAccountInfo,
GetBalance,
Expand Down Expand Up @@ -48,6 +50,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 @@ -2078,10 +2078,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 @@ -1776,8 +1776,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