Add saturating sub to slash_validator
This commit is contained in:
parent
e43d27f3e4
commit
99ae734638
@ -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);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user