mirror of
https://github.com/sigp/lighthouse.git
synced 2026-03-03 00:31:50 +00:00
Add saturating sub to slash_validator
This commit is contained in:
@@ -37,7 +37,7 @@ pub fn slash_validator<T: EthSpec>(
|
||||
safe_add_assign!(state.balances[proposer_index], proposer_reward);
|
||||
safe_add_assign!(
|
||||
state.balances[whistleblower_index],
|
||||
whistleblowing_reward - proposer_reward
|
||||
whistleblowing_reward.saturating_sub(proposer_reward)
|
||||
);
|
||||
safe_sub_assign!(state.balances[slashed_index], whistleblowing_reward);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user