fix: reset builder withdrawable epoch only if balance swept - #9609
Conversation
…s-specs #5384) process_builder_deposit_request now resets withdrawable_epoch only when the exited builder's balance is 0, before adding the deposit amount. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
There was a problem hiding this comment.
Code Review
This pull request updates the processBuilderDepositRequest function to ensure that an exited builder's withdrawable epoch is only reset if their balance is zero (fully swept). To support this, the balance increment now occurs after the epoch reset check. Corresponding unit tests have been updated and added to cover both fully-swept and non-swept exited builder scenarios. There are no review comments, so no feedback is provided.
Important
The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.
| }); | ||
|
|
||
| it("resets the withdrawable epoch when topping up an exited builder", () => { | ||
| it("resets the withdrawable epoch when topping up an exited, fully-swept builder", () => { |
There was a problem hiding this comment.
I meant to remove these in the other PR to upgrade to alpha.11, I think these unit tests are mostly useless, spec tests already cover this
let's clean them up separately though
ethereum/consensus-specs#5384