mirror of
https://github.com/sigp/lighthouse.git
synced 2026-03-10 20:22:02 +00:00
Electra alpha8 spec updates (#6496)
* Fix partial withdrawals count * Remove get_active_balance * Remove queue_entire_balance_and_reset_validator * Switch to compounding when consolidating with source==target * Queue deposit requests and apply them during epoch processing * Fix ef tests * Clear todos * Fix engine api formatting issues * Merge branch 'unstable' into electra-alpha7 * Make add_validator_to_registry more in line with the spec * Address some review comments * Cleanup * Update initialize_beacon_state_from_eth1 * Merge branch 'unstable' into electra-alpha7 * Fix rpc decoding for blobs by range/root * Fix block hash computation * Fix process_deposits bug * Merge branch 'unstable' into electra-alpha7 * Fix topup deposit processing bug * Update builder api for electra * Refactor mock builder to separate functionality * Merge branch 'unstable' into electra-alpha7 * Address review comments * Use copied for reference rather than cloned * Optimise and simplify PendingDepositsContext::new * Merge remote-tracking branch 'origin/unstable' into electra-alpha7 * Fix processing of deposits with invalid signatures * Remove redundant code in genesis init * Revert "Refactor mock builder to separate functionality" This reverts commit6d10456912. * Revert "Update builder api for electra" This reverts commitc5c9aca6db. * Simplify pre-activation sorting * Fix stale validators used in upgrade_to_electra * Merge branch 'unstable' into electra-alpha7
This commit is contained in:
@@ -514,6 +514,7 @@ pub fn get_expected_withdrawals<E: EthSpec>(
|
||||
// Consume pending partial withdrawals
|
||||
let partial_withdrawals_count =
|
||||
if let Ok(partial_withdrawals) = state.pending_partial_withdrawals() {
|
||||
let mut partial_withdrawals_count = 0;
|
||||
for withdrawal in partial_withdrawals {
|
||||
if withdrawal.withdrawable_epoch > epoch
|
||||
|| withdrawals.len() == spec.max_pending_partials_per_withdrawals_sweep as usize
|
||||
@@ -546,8 +547,9 @@ pub fn get_expected_withdrawals<E: EthSpec>(
|
||||
});
|
||||
withdrawal_index.safe_add_assign(1)?;
|
||||
}
|
||||
partial_withdrawals_count.safe_add_assign(1)?;
|
||||
}
|
||||
Some(withdrawals.len())
|
||||
Some(partial_withdrawals_count)
|
||||
} else {
|
||||
None
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user