mirror of
https://github.com/sigp/lighthouse.git
synced 2026-05-08 01:05:47 +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[proposer_index], proposer_reward);
|
||||||
safe_add_assign!(
|
safe_add_assign!(
|
||||||
state.balances[whistleblower_index],
|
state.balances[whistleblower_index],
|
||||||
whistleblowing_reward - proposer_reward
|
whistleblowing_reward.saturating_sub(proposer_reward)
|
||||||
);
|
);
|
||||||
safe_sub_assign!(state.balances[slashed_index], whistleblowing_reward);
|
safe_sub_assign!(state.balances[slashed_index], whistleblowing_reward);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user