update errors

This commit is contained in:
Hardhat Chad
2024-03-16 03:31:19 +00:00
parent 0d54d114f0
commit 350b92213e
4 changed files with 21 additions and 21 deletions

View File

@@ -72,7 +72,7 @@ pub fn process_reset<'a, 'info>(
let treasury = Treasury::try_from_bytes_mut(&mut treasury_data)?;
let threshold = treasury.last_reset_at.saturating_add(EPOCH_DURATION);
if clock.unix_timestamp.lt(&threshold) {
return Err(OreError::InvalidReset.into());
return Err(OreError::ResetTooEarly.into());
}
// Record current timestamp