Skip to content

cleanup: breaking up expected withdrawals into smaller functions #15194

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 6 commits into
base: develop
Choose a base branch
from

Conversation

james-prysm
Copy link
Contributor

@james-prysm james-prysm commented Apr 17, 2025

What type of PR is this?

Other

What does this PR do? Why is it needed?

just some cleanup review feedback that I'm breaking out into a separate PR

Which issues(s) does this PR fix?

Fixes #

Other notes for review

Acknowledgements

@james-prysm james-prysm added the Cleanup Code health! label Apr 17, 2025
@james-prysm james-prysm changed the title cleanup: expected withdrawals cleanup: breaking up expected withdrawals into smaller functions Apr 17, 2025
@james-prysm james-prysm requested a review from potuz April 17, 2025 19:57
potuz
potuz previously approved these changes Apr 17, 2025
Copy link
Contributor

@potuz potuz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, you could independently test some of the functions, but I think it's fine with the existing Electra tests.

terencechain
terencechain previously approved these changes Apr 17, 2025
potuz
potuz previously approved these changes Apr 23, 2025
Copy link
Contributor

@potuz potuz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@james-prysm james-prysm dismissed stale reviews from terencechain and potuz via 6faa112 May 7, 2025 21:48
}
processedPartialWithdrawalsCount++
}
return withdrawals, withdrawalIndex, processedPartialWithdrawalsCount, nil
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is pretty ugly returning so many values

}

func (b *BeaconState) processPendingPartialWithdrawals(withdrawals []*enginev1.Withdrawal) ([]*enginev1.Withdrawal, uint64, uint64, error) {
withdrawalIndex := b.nextWithdrawalIndex
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this part is redefining already existing variables , this is safe for this function but must be considered for future changes

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Cleanup Code health!
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants