Instruction: Deactivate
This instruction deactivates delegation of a stake account by setting the deactivation epoch.
Input structure
pub enum StakeInstruction {
    /// # Account references
    ///   0. `[WRITE]` Delegated stake account
    ///   1. `[]` Clock sysvar
    ///   2. `[SIGNER]` Stake authority
    Deactivate,
}
Accounts
stake_account: The delegated stake account.Signer: No.
Init: No.
PDA: No.
Writable: Yes.
Rent checks: None.
Ownership checks: The account must be owned by the program.
Address checks: None.
clock: The account must be a clock sysvar.
stake_authority: The stake authority account who is authorized to manage the stake account.Signer: Yes.
Init: No.
PDA: No.
Writable: No.
Rent checks: None.
Ownership checks: None.
Address checks: None.
Additional checks and behavior
The staker of the stake account must be a signer.
The stake account must be in the
Stakestate.The stake account must not be deactivated.
The deactivation epoch of the stake account is set to the current epoch.