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

State: HasPendingBalanceToWithdraw #14200

Merged
merged 2 commits into from
Jul 11, 2024
Merged

Conversation

prestonvanloon
Copy link
Member

What type of PR is this?

Other

What does this PR do? Why is it needed?

Follow up to #14176. This PR implements HasPendingBalanceToWithdraw which improves on the best case lookup.

Which issues(s) does this PR fix?

Other notes for review

@prestonvanloon prestonvanloon added the Electra electra hardfork label Jul 9, 2024
@prestonvanloon prestonvanloon requested a review from a team as a code owner July 9, 2024 21:19
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

@@ -501,3 +501,24 @@ func (b *BeaconState) PendingBalanceToWithdraw(idx primitives.ValidatorIndex) (u
}
return sum, nil
}

func (b *BeaconState) HasPendingBalanceToWithdraw(idx primitives.ValidatorIndex) (bool, error) {
Copy link
Contributor

Choose a reason for hiding this comment

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

Would be good to have a function description even though it's obvious what this one does

@prestonvanloon prestonvanloon added this pull request to the merge queue Jul 11, 2024
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Jul 11, 2024
@prestonvanloon prestonvanloon added this pull request to the merge queue Jul 11, 2024
Merged via the queue into develop with commit a00b40f Jul 11, 2024
17 checks passed
@prestonvanloon prestonvanloon deleted the HasPendingBalanceToWithdraw branch July 11, 2024 20:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Electra electra hardfork
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants