Skip to content
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

move credential helpers to ReadOnlyValidator methods #14808

Merged
merged 5 commits into from
Jan 17, 2025

Conversation

potuz
Copy link
Contributor

@potuz potuz commented Jan 17, 2025

This PR removes the helpers HasCompoundingWithdrawalCredential, HasETH1WithdrawalCredential and HasExecutionWithdrawalCredentials to exposed methods within the ReadOnlyValidator interface.

It also fixes the naming to be coherent in number.

@potuz potuz requested a review from a team as a code owner January 17, 2025 00:44
@potuz potuz requested review from nalepae, saolyn and rkapka January 17, 2025 00:44
@potuz potuz enabled auto-merge January 17, 2025 01:41
if v.IsNil() {
return false
}
return v.validator.WithdrawalCredentials[0] == params.BeaconConfig().ETH1AddressWithdrawalPrefixByte
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 will panic if WithdrawalCredentials is nil, this could be changed in v.IsNil but anyway if we reach code with a nil validator entry we are already booked and there's no reason to continue running

@potuz potuz added this pull request to the merge queue Jan 17, 2025
Merged via the queue into develop with commit b76f7fe Jan 17, 2025
15 checks passed
@potuz potuz deleted the validator_withdrawl_cred branch January 17, 2025 12:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants