remove admin stuff

This commit is contained in:
Hardhat Chad
2024-06-24 16:55:23 +00:00
parent 0b57e5bba4
commit dfc24e5c46
8 changed files with 10 additions and 115 deletions

View File

@@ -24,7 +24,7 @@ use crate::{
loaders::*,
state::{Bus, Config, Proof},
utils::{AccountDeserialize, MineEvent},
EPOCH_DURATION, MIN_DIFFICULTY, ONE_MINUTE, ONE_YEAR,
EPOCH_DURATION, MIN_DIFFICULTY, ONE_MINUTE, ONE_YEAR, TOLERANCE,
};
/// Mine is the primary workhorse instruction of the Ore program. Its responsibilities include:
@@ -128,14 +128,14 @@ pub fn process_mine<'a, 'info>(
// Apply spam penalty
let t = clock.unix_timestamp;
let t_target = proof.last_hash_at.saturating_add(ONE_MINUTE);
let t_spam = t_target.saturating_sub(config.tolerance_spam);
let t_spam = t_target.saturating_sub(TOLERANCE);
if t.lt(&t_spam) {
sol_log("Spam penalty");
return Err(OreError::Spam.into());
}
// Apply liveness penalty
let t_liveness = t_target.saturating_add(config.tolerance_liveness);
let t_liveness = t_target.saturating_add(TOLERANCE);
if t.gt(&t_liveness) {
reward = reward.saturating_sub(
reward