ChainSafe / ChainSafe/lodestar
head and reorg event not always emitted
Open
prio-high
- Dominant language
- TypeScript
- Stars
- 1.4k
- Forks
- 483
- Avg merge
- 1d 16h
- Merged PRs (30d)
- 150
Description
`this.chain.recomputeForkChoiceHead()` is called in multiple places beyond importBlock. The importBlock assumes that recomputeForkChoiceHead is only called there, so the head and reorg events are only emitted for head recomputed there
Also the strong reference to the head state is only set on the importBlock flow, so there's a risk the node gets stuck if the head changes outside of importBlock
Contributor guide
Assessment
This issue has not been assessed yet.