lighthouse/consensus/fork_choice/src
Paul Hauner e4fa7d906f Fix post-merge checkpoint sync (#3065)
## Issue Addressed

This address an issue which was preventing checkpoint-sync.

When the node starts from checkpoint sync, the head block and the finalized block are the same value. We did not respect this when sending a `forkchoiceUpdated` (fcU) call to the EL and were expecting fork choice to hold the *finalized ancestor of the head* and returning an error when it didn't.

This PR uses *only fork choice* for sending fcU updates. This is actually quite nice and avoids some atomicity issues between `chain.canonical_head` and `chain.fork_choice`. Now, whenever `chain.fork_choice.get_head` returns a value we also cache the values required for the next fcU call.

## TODO

- [x] ~~Blocked on #3043~~
- [x] Ensure there isn't a warn message at startup.
2022-03-10 06:05:24 +00:00
..
fork_choice_store.rs v1.1.6 Fork Choice changes (#2822) 2021-12-13 20:43:22 +00:00
fork_choice.rs Fix post-merge checkpoint sync (#3065) 2022-03-10 06:05:24 +00:00
lib.rs Rename random to prev_randao (#3040) 2022-03-03 02:10:57 +00:00