mirror of
https://github.com/d0zingcat/ore.git
synced 2026-05-17 07:26:52 +00:00
saturating sub
This commit is contained in:
@@ -131,7 +131,7 @@ pub fn process_mine<'a, 'info>(
|
||||
.unwrap();
|
||||
sol_log(&format!("ratio: {}", ratio));
|
||||
if t.gt(&t_liveness) {
|
||||
let reward_diff = reward.checked_sub(ratio).unwrap();
|
||||
let reward_diff = reward.saturating_sub(ratio);
|
||||
sol_log(&format!("reward_diff: {}", reward_diff));
|
||||
reward = reward_diff;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user