Clean up progressive balance slashings further (#4834)

* Clean up progressive balance slashings further

* Fix Rayon deadlock in test utils

* Fix cargo-fmt
This commit is contained in:
Michael Sproul
2023-10-13 16:45:56 +11:00
committed by GitHub
parent b121e69fcf
commit bb6675e42d
3 changed files with 31 additions and 16 deletions

View File

@@ -69,9 +69,10 @@ pub fn update_progressive_balances_on_attestation<T: EthSpec>(
validator_effective_balance: u64,
validator_slashed: bool,
) -> Result<(), BlockProcessingError> {
if is_progressive_balances_enabled(state) && !validator_slashed {
if is_progressive_balances_enabled(state) {
state.progressive_balances_cache_mut().on_new_attestation(
epoch,
validator_slashed,
flag_index,
validator_effective_balance,
)?;