This commit is contained in:
Hardhat Chad
2024-05-24 21:58:09 +00:00
parent 8b8f77ee1f
commit b47c809790

View File

@@ -157,10 +157,7 @@ pub fn process_mine<'a, 'info>(
sol_log(&format!("Total {}", reward));
sol_log(&format!("Bus {}", bus.rewards));
bus.theoretical_rewards = bus.theoretical_rewards.saturating_add(reward);
bus.rewards = bus
.rewards
.checked_sub(reward_actual)
.expect("This should not happen");
bus.rewards = bus.rewards.saturating_sub(reward_actual);
proof.balance = proof.balance.saturating_add(reward_actual);
// Hash recent slot hash into the next challenge to prevent pre-mining attacks