Use source.effective_balance for consolidaiton churn

This commit is contained in:
Mikhail Kalinin 2024-03-28 11:49:44 +06:00
parent 915f90e13e
commit 534bcfc116
1 changed files with 2 additions and 2 deletions

View File

@ -959,8 +959,8 @@ def process_consolidation(state: BeaconState, signed_consolidation: SignedConsol
assert bls.FastAggregateVerify(pubkeys, signing_root, signed_consolidation.signature) assert bls.FastAggregateVerify(pubkeys, signing_root, signed_consolidation.signature)
# Initiate source validator exit and append pending consolidation # Initiate source validator exit and append pending consolidation
active_balance = get_active_balance(state, consolidation.source_index) source_validator.exit_epoch = compute_consolidation_epoch_and_update_churn(
source_validator.exit_epoch = compute_consolidation_epoch_and_update_churn(state, active_balance) state, source_validator.effective_balance)
source_validator.withdrawable_epoch = Epoch( source_validator.withdrawable_epoch = Epoch(
source_validator.exit_epoch + MIN_VALIDATOR_WITHDRAWABILITY_DELAY source_validator.exit_epoch + MIN_VALIDATOR_WITHDRAWABILITY_DELAY
) )