Reject close of active vote accounts (#22651)
* 10461 Reject close of vote accounts unless it earned no credits in the previous epoch. This is checked by comparing current epoch (from clock sysvar) with the most recent epoch with credits in vote state.
This commit is contained in:
@ -252,6 +252,10 @@ pub enum InstructionError {
|
||||
/// Accounts data budget exceeded
|
||||
#[error("Requested account data allocation exceeded the accounts data budget")]
|
||||
AccountsDataBudgetExceeded,
|
||||
|
||||
/// Active vote account close
|
||||
#[error("Cannot close vote account unless it stopped voting at least one full epoch ago")]
|
||||
ActiveVoteAccountClose,
|
||||
// Note: For any new error added here an equivalent ProgramError and its
|
||||
// conversions must also be added
|
||||
}
|
||||
|
Reference in New Issue
Block a user