Skip to content

Commit

Permalink
Implement "Add missed exit checks to consolidation processing"
Browse files Browse the repository at this point in the history
  • Loading branch information
michaelsproul committed Dec 19, 2024
1 parent 9d5a3af commit f892849
Showing 1 changed file with 12 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -764,6 +764,18 @@ pub fn process_consolidation_request<E: EthSpec>(
{
return Ok(());
}
// Verify the source has been active long enough
if current_epoch
< source_validator
.activation_epoch
.safe_add(spec.shard_committee_period)?
{
return Ok(());
}
// Verify the source has no pending withdrawals in the queue
if state.get_pending_balance_to_withdraw(source_index)? > 0 {
return Ok(());
}

// Initiate source validator exit and append pending consolidation
let source_exit_epoch = state
Expand Down

0 comments on commit f892849

Please sign in to comment.