Skip to content

Commit

Permalink
Radek feedback
Browse files Browse the repository at this point in the history
  • Loading branch information
prestonvanloon committed Jul 3, 2024
1 parent aec0015 commit 7473388
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion beacon-chain/core/electra/deposits.go
Original file line number Diff line number Diff line change
Expand Up @@ -269,16 +269,18 @@ func ProcessPendingBalanceDeposits(ctx context.Context, st state.BeaconState, ac
}
}
} else {
// Validator is not exiting, attempt to process deposit.
if primitives.Gwei(processedAmount+balanceDeposit.Amount) > availableForProcessing {
break
}

// Deposit fits in churn, process it. Increase balance and consume churn.
if err := helpers.IncreaseBalance(st, balanceDeposit.Index, balanceDeposit.Amount); err != nil {
return err
}
processedAmount += balanceDeposit.Amount
}

// Regardless of how the deposit was handled, we move on in the queue.
nextDepositIndex++
}

Expand Down

0 comments on commit 7473388

Please sign in to comment.