Disallow closing the top stake account

This commit is contained in:
Hardhat Chad
2024-07-05 15:25:49 +00:00
parent cbfc7afc2b
commit bcba77eb7c
2 changed files with 18 additions and 2 deletions

View File

@@ -23,6 +23,10 @@ pub enum OreError {
ToleranceOverflow = 7,
#[error("The maximum supply has been reached")]
MaxSupply = 8,
#[error("This account cannot be closed because it's the top staker")]
CannotClose = 9,
#[error("This account cannot be crowned because its last stake was too recent")]
CannotCrown = 10,
}
impl From<OreError> for ProgramError {