nimbus-eth2/beacon_chain
Etan Kissling 5115aaedb7
early exit commonAncestor when comparing with finalizedHead (#5174)
* early exit `commonAncestor` when comparing with `finalizedHead`

As all `BlockRef` lead to `finalizedHead` (`parent == nil`),
can shortcut in that situation and immediately return `finalizedHead`
if passed as one of the arguments.

* typo in comment

* add test from #5152

Co-authored-by: tersec <tersec@users.noreply.github.com>

* add note about test complexity

* regenerate test summary

---------

Co-authored-by: tersec <tersec@users.noreply.github.com>
2023-07-10 20:36:25 +00:00
..
2023-06-08 13:42:19 +00:00
2022-04-08 16:22:49 +00:00
2023-06-27 03:58:14 +03:00