mirror of
https://github.com/d0zingcat/ore.git
synced 2026-05-17 15:10:21 +00:00
remove admin stuff
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user