opt maybe_update_best_child_and_descendant: remove an impossible case (#4583)

Here `child.weight == best_child.weight` is impossible since it's already checked [above](dfcb3363c7/consensus/proto_array/src/proto_array.rs (L878)).
This commit is contained in:
zhiqiangxu 2023-08-14 03:16:04 +00:00
parent ca050053bf
commit dfab24bf92

View File

@ -884,7 +884,7 @@ impl ProtoArray {
} }
} else { } else {
// Choose the winner by weight. // Choose the winner by weight.
if child.weight >= best_child.weight { if child.weight > best_child.weight {
change_to_child change_to_child
} else { } else {
no_change no_change