silent return on reset too early

This commit is contained in:
Hardhat Chad
2024-04-28 20:53:22 +00:00
parent 0677500cb4
commit 3ecf215151
3 changed files with 6 additions and 12 deletions

View File

@@ -77,7 +77,7 @@ pub fn process_reset<'a, 'info>(
let clock = Clock::get().or(Err(ProgramError::InvalidAccountData))?;
let threshold = config.last_reset_at.saturating_add(EPOCH_DURATION);
if clock.unix_timestamp.lt(&threshold) {
return Err(OreError::ResetTooEarly.into());
return Ok(());
}
// Update reset timestamp