Skip to content

Commit

Permalink
fix endless loop when validator set cannot be loaded on dead chain
Browse files Browse the repository at this point in the history
  • Loading branch information
pk910 committed Oct 14, 2024
1 parent 1dae519 commit 19453b3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion indexer/beacon/canonical.go
Original file line number Diff line number Diff line change
Expand Up @@ -365,7 +365,7 @@ func (indexer *Indexer) GetCanonicalValidatorSet(overrideForkId *ForkKey) []*v1.

for {
epoch := chainState.EpochOfSlot(canonicalHead.Slot)
if headEpoch-epoch > 2 {
if headEpoch-epoch > 2 || epoch == 0 {
return validatorSet
}

Expand Down

0 comments on commit 19453b3

Please sign in to comment.