ChainSafe / ChainSafe/lodestar

head and reorg event not always emitted

Open
#5,494 6 comments 0 reactions 0 assignees View on GitHub
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

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.