Skip to content

Commit

Permalink
opt maybe_update_best_child_and_descendant: remove an impossible ca…
Browse files Browse the repository at this point in the history
…se (#4583)

Here `child.weight == best_child.weight` is impossible since it's already checked [above](https://github.com/sigp/lighthouse/blob/dfcb3363c757671eb19d5f8e519b4b94ac74677a/consensus/proto_array/src/proto_array.rs#L878).
  • Loading branch information
zhiqiangxu committed Aug 14, 2023
1 parent ca05005 commit dfab24b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion consensus/proto_array/src/proto_array.rs
Original file line number Diff line number Diff line change
Expand Up @@ -884,7 +884,7 @@ impl ProtoArray {
}
} else {
// Choose the winner by weight.
if child.weight >= best_child.weight {
if child.weight > best_child.weight {
change_to_child
} else {
no_change
Expand Down

0 comments on commit dfab24b

Please sign in to comment.