mirror of
https://github.com/d0zingcat/ore.git
synced 2026-05-14 23:16:48 +00:00
silent return on reset too early
This commit is contained in:
@@ -14,10 +14,6 @@ use crate::{
|
||||
PROOF,
|
||||
};
|
||||
|
||||
// TODO Create a stake account (token account)
|
||||
// TODO Need to keep claimable balance (from treasury) separate from staking balance (from stake account)
|
||||
// TODO Multiplier calculations should account for both
|
||||
|
||||
/// Register generates a new hash chain for a prospective miner. Its responsibilities include:
|
||||
/// 1. Initialize a new proof account.
|
||||
/// 2. Generate an initial hash from the signer's key.
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user