Skip to content

Conversation

@jtraglia
Copy link
Member

@jtraglia jtraglia commented Dec 1, 2025

The get_expected_withdrawals is a long, complex function.

This PR splits get_expected_withdrawals into smaller functions:

  • get_sweep_withdrawals
  • get_pending_partial_withdrawals
  • get_builder_withdrawals

Associated with:

Note: I decided to include prior_withdrawals in all functions so that we don't need create a modified function which makes such a simple change. I didn't include many comments; we can look into making that better. Open to suggestions on other simplifications.

@leolara
Copy link
Member

leolara commented Dec 4, 2025

I think this type of change that improves the readability of the specs are very good.

@leolara
Copy link
Member

leolara commented Dec 4, 2025

I didn't include many comments; we can look into making that better. Open to suggestions on other simplifications.

Splitting the code in more functions make them more self-explanatory

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants