Skip to content

Conversation

zhiqiangxu
Copy link
Contributor

Here child.weight == best_child.weight is impossible since it's already checked above.

@zhiqiangxu zhiqiangxu changed the title remove an impossible case opt maybe_update_best_child_and_descendant: remove an impossible case Aug 9, 2023
@zhiqiangxu zhiqiangxu changed the title opt maybe_update_best_child_and_descendant: remove an impossible case opt maybe_update_best_child_and_descendant: remove an impossible case Aug 9, 2023
Copy link
Member

@michaelsproul michaelsproul left a comment

Choose a reason for hiding this comment

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

LGTM. I'll get someone else to triple-check it

@michaelsproul michaelsproul added code-quality consensus An issue/PR that touches consensus code, such as state_processing or block verification. under-review A reviewer has only partially completed a review. v4.4.1 ETA August 2023 labels Aug 11, 2023
Copy link
Member

@paulhauner paulhauner left a comment

Choose a reason for hiding this comment

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

Looks good to me. I was initially hesitant, however I like that it would prevent flipping between the child and best_child in the case of a bug earlier in this function.

@michaelsproul michaelsproul added ready-for-merge This PR is ready to merge. and removed under-review A reviewer has only partially completed a review. labels Aug 14, 2023
@michaelsproul
Copy link
Member

bors r+

bors bot pushed a commit that referenced this pull request Aug 14, 2023
@bors
Copy link

bors bot commented Aug 14, 2023

Build failed (retrying...):

bors bot pushed a commit that referenced this pull request Aug 14, 2023
@bors
Copy link

bors bot commented Aug 14, 2023

Pull request successfully merged into unstable.

Build succeeded!

The publicly hosted instance of bors-ng is deprecated and will go away soon.

If you want to self-host your own instance, instructions are here.
For more help, visit the forum.

If you want to switch to GitHub's built-in merge queue, visit their help page.

@bors bors bot changed the title opt maybe_update_best_child_and_descendant: remove an impossible case [Merged by Bors] - opt maybe_update_best_child_and_descendant: remove an impossible case Aug 14, 2023
@bors bors bot closed this Aug 14, 2023
Woodpile37 pushed a commit to Woodpile37/lighthouse that referenced this pull request Jan 6, 2024
Woodpile37 pushed a commit to Woodpile37/lighthouse that referenced this pull request Jan 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
code-quality consensus An issue/PR that touches consensus code, such as state_processing or block verification. ready-for-merge This PR is ready to merge. v4.4.1 ETA August 2023
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants